mirror of
https://github.com/umami-software/umami.git
synced 2026-02-07 06:07:17 +01:00
Add timezone to report queries.
This commit is contained in:
parent
820ad69d60
commit
29a943df9c
7 changed files with 32 additions and 6 deletions
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) {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue