mirror of
https://github.com/usememos/memos.git
synced 2024-12-26 07:01:17 +08:00
chore: use translations for calendar days (#3895)
Use translations for calendar days
This commit is contained in:
parent
044d46c36d
commit
05d5fb4b04
1 changed files with 1 additions and 2 deletions
|
@ -6,8 +6,6 @@ import { WorkspaceGeneralSetting } from "@/types/proto/api/v1/workspace_setting_
|
|||
import { WorkspaceSettingKey } from "@/types/proto/store/workspace_setting";
|
||||
import { useTranslate } from "@/utils/i18n";
|
||||
|
||||
const WEEK_DAYS = ["Su", "Mo", "Tu", "We", "Th", "Fr", "Sa"];
|
||||
|
||||
interface Props {
|
||||
// Format: 2021-1
|
||||
month: string;
|
||||
|
@ -43,6 +41,7 @@ const ActivityCalendar = (props: Props) => {
|
|||
const dayInMonth = new Date(year, month, 0).getDate();
|
||||
const firstDay = (new Date(year, month - 1, 1).getDay() - weekStartDayOffset) % 7;
|
||||
const lastDay = new Date(year, month - 1, dayInMonth).getDay() - weekStartDayOffset;
|
||||
const WEEK_DAYS = [t("days.sun"), t("days.mon"), t("days.tue"), t("days.wed"), t("days.thu"), t("days.fri"), t("days.sat")];
|
||||
const weekDays = WEEK_DAYS.slice(weekStartDayOffset).concat(WEEK_DAYS.slice(0, weekStartDayOffset));
|
||||
const maxCount = Math.max(...Object.values(data));
|
||||
const days = [];
|
||||
|
|
Loading…
Reference in a new issue