- {firstDayISO !== firstDayOfWeekISO &&
}
-
-
+ <>
+
+
+ {firstDayISO !== firstDayOfWeekISO &&
}
+
+
+
+ >
+ )
+}
+
+function CalendarWeekHeader({ rawFirstDayOfWeek }: { rawFirstDayOfWeek: number }) {
+ let localeDaysOfWeek = [...DAYS_OF_WEEK];
+ const shifted = localeDaysOfWeek.splice(0, rawFirstDayOfWeek);
+ localeDaysOfWeek = ['', ...localeDaysOfWeek, ...shifted];
+
+ return (
+
+ {localeDaysOfWeek.map(dayOfWeek => {dayOfWeek})}
)
}
diff --git a/apps/client/src/widgets/launch_bar/CalendarWidgetUtils.ts b/apps/client/src/widgets/launch_bar/CalendarWidgetUtils.ts
index e7a59aa4a..3b598bbe9 100644
--- a/apps/client/src/widgets/launch_bar/CalendarWidgetUtils.ts
+++ b/apps/client/src/widgets/launch_bar/CalendarWidgetUtils.ts
@@ -1,4 +1,15 @@
import { Dayjs } from "@triliumnext/commons";
+import { t } from "../../services/i18n";
+
+export const DAYS_OF_WEEK = [
+ t("calendar.sun"),
+ t("calendar.mon"),
+ t("calendar.tue"),
+ t("calendar.wed"),
+ t("calendar.thu"),
+ t("calendar.fri"),
+ t("calendar.sat")
+];
export interface DateRangeInfo {
weekNumbers: number[];