@@ -71,22 +71,22 @@ export class PlainDateTime {
71
71
get year ( ) {
72
72
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
73
73
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
74
- return ES . CalendarYear ( GetSlot ( this , CALENDAR ) , isoDate ) ;
74
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { year : true } ) . year ;
75
75
}
76
76
get month ( ) {
77
77
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
78
78
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
79
- return ES . CalendarMonth ( GetSlot ( this , CALENDAR ) , isoDate ) ;
79
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { month : true } ) . month ;
80
80
}
81
81
get monthCode ( ) {
82
82
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
83
83
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
84
- return ES . CalendarMonthCode ( GetSlot ( this , CALENDAR ) , isoDate ) ;
84
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { monthCode : true } ) . monthCode ;
85
85
}
86
86
get day ( ) {
87
87
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
88
88
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
89
- return ES . CalendarDay ( GetSlot ( this , CALENDAR ) , isoDate ) ;
89
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { day : true } ) . day ;
90
90
}
91
91
get hour ( ) {
92
92
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
@@ -115,57 +115,57 @@ export class PlainDateTime {
115
115
get era ( ) {
116
116
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
117
117
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
118
- return ES . CalendarEra ( GetSlot ( this , CALENDAR ) , isoDate ) ;
118
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { era : true } ) . era ;
119
119
}
120
120
get eraYear ( ) {
121
121
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
122
122
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
123
- return ES . CalendarEraYear ( GetSlot ( this , CALENDAR ) , isoDate ) ;
123
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { eraYear : true } ) . eraYear ;
124
124
}
125
125
get dayOfWeek ( ) {
126
126
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
127
127
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
128
- return ES . CalendarDayOfWeek ( GetSlot ( this , CALENDAR ) , isoDate ) ;
128
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { dayOfWeek : true } ) . dayOfWeek ;
129
129
}
130
130
get dayOfYear ( ) {
131
131
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
132
132
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
133
- return ES . CalendarDayOfYear ( GetSlot ( this , CALENDAR ) , isoDate ) ;
133
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { dayOfYear : true } ) . dayOfYear ;
134
134
}
135
135
get weekOfYear ( ) {
136
136
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
137
137
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
138
- return ES . CalendarWeekOfYear ( GetSlot ( this , CALENDAR ) , isoDate ) ;
138
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { weekOfYear : true } ) . weekOfYear . week ;
139
139
}
140
140
get yearOfWeek ( ) {
141
141
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
142
142
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
143
- return ES . CalendarYearOfWeek ( GetSlot ( this , CALENDAR ) , isoDate ) ;
143
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { weekOfYear : true } ) . weekOfYear . year ;
144
144
}
145
145
get daysInWeek ( ) {
146
146
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
147
147
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
148
- return ES . CalendarDaysInWeek ( GetSlot ( this , CALENDAR ) , isoDate ) ;
148
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { daysInWeek : true } ) . daysInWeek ;
149
149
}
150
150
get daysInYear ( ) {
151
151
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
152
152
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
153
- return ES . CalendarDaysInYear ( GetSlot ( this , CALENDAR ) , isoDate ) ;
153
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { daysInYear : true } ) . daysInYear ;
154
154
}
155
155
get daysInMonth ( ) {
156
156
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
157
157
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
158
- return ES . CalendarDaysInMonth ( GetSlot ( this , CALENDAR ) , isoDate ) ;
158
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { daysInMonth : true } ) . daysInMonth ;
159
159
}
160
160
get monthsInYear ( ) {
161
161
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
162
162
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
163
- return ES . CalendarMonthsInYear ( GetSlot ( this , CALENDAR ) , isoDate ) ;
163
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { monthsInYear : true } ) . monthsInYear ;
164
164
}
165
165
get inLeapYear ( ) {
166
166
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
167
167
const isoDate = ES . TemporalObjectToISODateRecord ( this ) ;
168
- return ES . CalendarInLeapYear ( GetSlot ( this , CALENDAR ) , isoDate ) ;
168
+ return ES . calendarImplForObj ( this ) . isoToDate ( isoDate , { inLeapYear : true } ) . inLeapYear ;
169
169
}
170
170
with ( temporalDateTimeLike , options = undefined ) {
171
171
if ( ! ES . IsTemporalDateTime ( this ) ) throw new TypeErrorCtor ( 'invalid receiver' ) ;
0 commit comments