Add timezone to report queries.
This commit is contained in:
1 parent
820ad69d60
commit
29a943df9c
7 files changed
+32
-6
No files matched your search
+7
-3
@@ -250,9 +250,13 @@ export const customFormats = {
|
||||
};
|
||||
|
||||
export function dateFormat(date, str, locale = 'en-US') {
|
||||
return format(date, customFormats?.[locale]?.[str] || str, {
|
||||
locale: getDateLocale(locale),
|
||||
});
|
||||
return format(
|
||||
typeof date === 'string' ? new Date(date) : date,
|
||||
customFormats?.[locale]?.[str] || str,
|
||||
{
|
||||
locale: getDateLocale(locale),
|
||||
},
|
||||
);
|
||||
}
|
||||
|
||||
export function maxDate(...args) {
|
||||
|
||||
Reference in new issue
Block a user