summaryrefslogtreecommitdiff
path: root/src/lib/event.ts
diff options
context:
space:
mode:
authorRaphael <mail@raphaelkabo.com>2025-05-28 18:00:35 +0100
committerGitHub <noreply@github.com>2025-05-28 18:00:35 +0100
commitbde9b408342f56833cf0a514488365189083f312 (patch)
treee20a4f074704a2f5ede5ebd05b4f4ad949cd8205 /src/lib/event.ts
parent69f75005303d634b9208c23068655385734f4d3a (diff)
parentfb85d79dd2333cd6e0982e5ee0fdc1070ff99889 (diff)
Merge pull request #198 from dinoue/feature/localization-again
Localization, again
Diffstat (limited to 'src/lib/event.ts')
-rw-r--r--src/lib/event.ts4
1 files changed, 3 insertions, 1 deletions
diff --git a/src/lib/event.ts b/src/lib/event.ts
index 334ddf6..bcb7cd9 100644
--- a/src/lib/event.ts
+++ b/src/lib/event.ts
@@ -1,3 +1,4 @@
+import i18next from "i18next";
import { IEventGroup } from "../models/EventGroup.js";
export interface EventListEvent {
@@ -15,7 +16,8 @@ export const bucketEventsByMonth = (
acc: Record<string, any>[],
event: EventListEvent,
) => {
- const month = event.startMoment.format("MMMM YYYY");
+ event.startMoment.locale(i18next.language);
+ const month = event.startMoment.format(i18next.t("common.year-month-format" ));
const matchingBucket = acc.find((bucket) => bucket.title === month);
if (!matchingBucket) {
acc.push({