File tree Expand file tree Collapse file tree 1 file changed +4
-3
lines changed
Expand file tree Collapse file tree 1 file changed +4
-3
lines changed Original file line number Diff line number Diff line change @@ -618,10 +618,11 @@ impl PlainYearMonth {
618618 // Useful for implementing HandleDateTimeTemporalYearMonth
619619 pub fn epoch_ns_for_utc ( & self ) -> EpochNanoseconds {
620620 // 2. Let isoDateTime be CombineISODateAndTimeRecord(temporalYearMonth.[[ISODate]], NoonTimeRecord()).
621- let iso = IsoDateTime :: new ( self . iso , IsoTime :: noon ( ) ) ;
622- debug_assert ! ( iso. is_ok( ) ) ;
621+ // new_unchecked: PYM is supposed to support year-months outside of the ISO range as well as long
622+ // as the year is in range
623+ let iso = IsoDateTime :: new_unchecked ( self . iso , IsoTime :: noon ( ) ) ;
623624 // 3. Let epochNs be ? GetUTCEpochNanoseconds(isoDateTime).
624- iso. unwrap_or_default ( ) . as_nanoseconds ( )
625+ iso. as_nanoseconds ( )
625626 }
626627
627628 /// Returns a RFC9557 IXDTF string for the current `PlainYearMonth`
You can’t perform that action at this time.
0 commit comments