code refactor

This commit is contained in:
MaysWind
2025-06-09 23:32:19 +08:00
parent cd37e2ab1d
commit 4111eb0838
27 changed files with 73 additions and 56 deletions
+3 -2
View File
@@ -13,6 +13,7 @@ import {
type LocalizedDateRange,
type LocalizedRecentMonthDateRange,
type UnixTimeRange,
type WeekDayValue,
Month,
WeekDay,
MeridiemIndicator,
@@ -746,7 +747,7 @@ export function useI18n() {
return getAllWeekdayNames('min');
}
function getAllWeekDays(firstDayOfWeek?: number): TypeAndDisplayName[] {
function getAllWeekDays(firstDayOfWeek?: WeekDayValue): TypeAndDisplayName[] {
const ret: TypeAndDisplayName[] = [];
const allWeekDays = WeekDay.values();
@@ -1293,7 +1294,7 @@ export function useI18n() {
}
}
function getMultiWeekdayLongNames(weekdayTypes: number[], firstDayOfWeek?: number): string {
function getMultiWeekdayLongNames(weekdayTypes: number[], firstDayOfWeek?: WeekDayValue): string {
const weekdayTypesMap: Record<number, boolean> = {};
if (!isNumber(firstDayOfWeek)) {