Add timezone to report queries.
This commit is contained in:
10
lib/date.js
10
lib/date.js
@@ -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