From afbce87825a82c1495ee2db3ba3f9de3008ff433 Mon Sep 17 00:00:00 2001 From: Disha Talreja Date: Tue, 30 Aug 2022 12:18:35 +0530 Subject: [PATCH] Updated: Used the correct dateTime format as per luxon(#1vy5ryh) --- src/main.ts | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/src/main.ts b/src/main.ts index 78f2f19..c0fc1d5 100644 --- a/src/main.ts +++ b/src/main.ts @@ -41,15 +41,15 @@ app.config.globalProperties.$filters = { formatDate(value: any, inFormat?: string, outFormat?: string) { // TODO Make default format configurable and from environment variables if(inFormat){ - return DateTime.fromFormat(value, inFormat).toFormat(outFormat ? outFormat : 'MM-DD-YYYY'); + return DateTime.fromFormat(value, inFormat).toFormat(outFormat ? outFormat : 'MM-dd-yyyy'); } - return DateTime.fromISO(value).toFormat(outFormat ? outFormat : 'MM-DD-YYYY'); + return DateTime.fromISO(value).toFormat(outFormat ? outFormat : 'MM-dd-yyyy'); }, formatUtcDate(value: any, inFormat?: any, outFormat?: string) { // TODO Make default format configurable and from environment variables const userProfile = store.getters['user/getUserProfile']; // TODO Fix this setDefault should set the default timezone instead of getting it everytiem and setting the tz - return DateTime.utc(value, inFormat).setZone(userProfile.userTimeZone).toFormat(outFormat ? outFormat : 'MM-DD-YYYY') + return DateTime.utc(value, inFormat).setZone(userProfile.userTimeZone).toFormat(outFormat ? outFormat : 'MM-dd-yyyy') }, getFeature(featureHierarchy: any, featureKey: string) { let featureValue = ''