calendar display type supports Gregorian with Chinese

This commit is contained in:
MaysWind
2025-09-06 01:06:31 +08:00
parent e15a5617e6
commit 8368b02be8
45 changed files with 38451 additions and 43 deletions
+6 -2
View File
@@ -1,5 +1,5 @@
import type { TypeAndName, TypeAndDisplayName } from '@/core/base.ts';
import type { CalendarType } from '@/core/calendar.ts';
import type { CalendarType, ChineseCalendarLocaleData } from '@/core/calendar.ts';
import type { NumeralSystem } from '@/core/numeral.ts';
export interface DateTime {
@@ -12,7 +12,6 @@ export interface DateTime {
getGregorianCalendarMonthDisplayName(options: DateTimeFormatOptions): string;
getGregorianCalendarMonthDisplayShortName(options: DateTimeFormatOptions): string;
getLocalizedCalendarMonth(options: DateTimeFormatOptions): string;
getLocalizedCalendarMonthIndex(options: DateTimeFormatOptions): number;
getLocalizedCalendarMonthDisplayName(options: DateTimeFormatOptions): string;
getLocalizedCalendarMonthDisplayShortName(options: DateTimeFormatOptions): string;
getGregorianCalendarDay(): number;
@@ -37,6 +36,7 @@ export interface DateTimeFormatOptions {
numeralSystem: NumeralSystem;
calendarType: CalendarType;
localeData: DateTimeLocaleData;
chineseCalendarLocaleData: ChineseCalendarLocaleData;
}
export interface DateTimeLocaleData {
@@ -82,6 +82,10 @@ export interface MonthDay {
readonly day: number;
}
export interface CalendarAlternateDate extends YearMonthDay {
readonly displayDate: string;
}
export interface TimeRange {
readonly minTime: number;
readonly maxTime: number;