calendar display type supports Gregorian with Persian, date display type supports Persian calendar

This commit is contained in:
MaysWind
2025-09-06 23:02:09 +08:00
parent 757f9e5b02
commit a469d66358
24 changed files with 209 additions and 20 deletions
+3 -1
View File
@@ -1,5 +1,5 @@
import type { TypeAndName, TypeAndDisplayName } from '@/core/base.ts';
import type { CalendarType, ChineseCalendarLocaleData } from '@/core/calendar.ts';
import type { CalendarType, ChineseCalendarLocaleData, PersianCalendarLocaleData } from '@/core/calendar.ts';
import type { NumeralSystem } from '@/core/numeral.ts';
export interface DateTime {
@@ -16,6 +16,7 @@ export interface DateTime {
getLocalizedCalendarMonthDisplayShortName(options: DateTimeFormatOptions): string;
getGregorianCalendarDay(): number;
getLocalizedCalendarDay(options: DateTimeFormatOptions): string;
isLocalizedCalendarFirstDayOfMonth(options: DateTimeFormatOptions): boolean;
getGregorianCalendarYearDashMonthDashDay(): TextualYearMonthDay;
getGregorianCalendarYearDashMonth(): TextualYearMonth;
getWeekDay(): WeekDay;
@@ -37,6 +38,7 @@ export interface DateTimeFormatOptions {
calendarType: CalendarType;
localeData: DateTimeLocaleData;
chineseCalendarLocaleData: ChineseCalendarLocaleData;
persianCalendarLocaleData: PersianCalendarLocaleData;
}
export interface DateTimeLocaleData {