const colorScheme = document.documentElement.getAttribute("data-bs-theme") ?? "auto";
const rangeColors = ["#14432a", "#166b34", "#37a446", "#4dd05a"];
const startDate = new Date(Date.now() - (365 * 24 * 60 * 60 * 1000));
- const monthNames = OSM.i18n.t("date.abbr_month_names");
const mediaQuery = window.matchMedia("(prefers-color-scheme: dark)");
type: "month",
gutter: 4,
label: {
- text: (timestamp) => monthNames[new Date(timestamp).getUTCMonth() + 1],
+ text: (timestamp) => new Date(timestamp).toLocaleString(OSM.i18n.locale, { timeZone: "UTC", month: "short" }),
position: "top",
textAlign: "middle"
},