Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Updated: Used the correct dateTime format as per luxon(#1vy5ryh) #61

Open
wants to merge 1 commit into
base: main
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
6 changes: 3 additions & 3 deletions src/main.ts
Original file line number Diff line number Diff line change
Expand Up @@ -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 = ''
Expand Down