1
0
mirror of https://github.com/mikecao/umami.git synced 2021-05-17 18:46:32 +03:00

fix(lib): add default value for getDateRange

This commit is contained in:
Alexander Klein
2021-03-10 10:40:59 +01:00
parent 3cb748b29b
commit f6f14bf104

View File

@@ -36,7 +36,7 @@ export function getLocalTime(t) {
return addMinutes(new Date(t), new Date().getTimezoneOffset());
}
export function getDateRange(value, locale) {
export function getDateRange(value, locale = 'en-US') {
const now = new Date();
const localeOptions = dateLocales[locale];