@@ -20,11 +20,11 @@ function arrayFromSet<T>(src: Set<T>): T[] {
2020}
2121
2222function calendarDateWeekOfYear ( id : BuiltinCalendarId , isoDate : ISODate ) : { week : number ; year : number } | undefined {
23- // Supports only Gregorian and ISO8601 calendar; can be updated to add support for other calendars.
23+ // Supports only ISO8601 calendar; can be updated to add support for other calendars.
2424 // Returns undefined for calendars without a well-defined week calendar system.
2525 // eslint-disable-next-line max-len
2626 // Also see: https://github.com/unicode-org/icu/blob/ab72ab1d4a3c3f9beeb7d92b0c7817ca93dfdb04/icu4c/source/i18n/calendar.cpp#L1606
27- if ( id !== 'gregory' && id !== ' iso8601') return undefined ;
27+ if ( id !== 'iso8601' ) return undefined ;
2828 const calendar = impl [ id ] ;
2929 let yow = isoDate . year ;
3030 const { dayOfWeek, dayOfYear, daysInYear } = calendar . isoToDate ( isoDate , {
@@ -34,8 +34,8 @@ function calendarDateWeekOfYear(id: BuiltinCalendarId, isoDate: ISODate): { week
3434 } ) ;
3535 const fdow = calendar . getFirstDayOfWeek ( ) ;
3636 const mdow = calendar . getMinimalDaysInFirstWeek ( ) ;
37- ES . uncheckedAssertNarrowedType < number > ( fdow , 'guaranteed to exist for iso8601/gregory ' ) ;
38- ES . uncheckedAssertNarrowedType < number > ( mdow , 'guaranteed to exist for iso8601/gregory ' ) ;
37+ ES . uncheckedAssertNarrowedType < number > ( fdow , 'guaranteed to exist for iso8601' ) ;
38+ ES . uncheckedAssertNarrowedType < number > ( mdow , 'guaranteed to exist for iso8601' ) ;
3939
4040 // For both the input date and the first day of its calendar year, calculate the day of week
4141 // relative to first day of week in the relevant calendar (e.g., in iso8601, relative to Monday).
@@ -1972,12 +1972,6 @@ class GregoryHelper extends SameMonthDayAsGregorianBaseHelper {
19721972 if ( era === 'a' ) era = 'gregory' ;
19731973 return { era, eraYear } as T ;
19741974 }
1975- override getFirstDayOfWeek ( ) {
1976- return 1 ;
1977- }
1978- override getMinimalDaysInFirstWeek ( ) {
1979- return 1 ;
1980- }
19811975}
19821976
19831977// NOTE: Only the 5 modern eras (Meiji and later) are included. For dates
0 commit comments