Skip to content

armgit / umami

Public Imported from GitHub
0

Umami is a privacy-first web and product analytics platform. Traffic, campaigns, behavior, conversions, and revenue in one place. No cookies, no surveillance, self-hosted or in the cloud.

fix(lib): add default value for getDateRange

Alexander Kleinf6f14bf10440
diff --git a/lib/date.js b/lib/date.js
index 06aaac13a..578d90141 100644
--- a/lib/date.js
+++ b/lib/date.js
@@ -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];