-
Notifications
You must be signed in to change notification settings - Fork 221
Open
Labels
C-datetimeComponent: datetime, calendars, time zonesComponent: datetime, calendars, time zonesU-temporalUser: Temporal and V8User: Temporal and V8
Milestone
Description
@sffc is working on this on the standards side
We have https://tc39.es/proposal-temporal/#sec-temporal-regulateisodate, which gets called by Temporal in code like this:
// Construct 01-01, Śaka 1927
var nonLeapYearFirstDay = Temporal.PlainDate.from("2005-03-22[u-ca=indian]");
nonLeapYearFirstDay.with({ day: 31 };
console.log(nonLeapYearFirstDay.day) // 30
Temporal throws range errors when constructing out-of-range dates, but .with()
is allowed to specify an overflow option.
As such, we need a way to take a set of codes and "constrain" them to that calendar when the overflow option is set.
Metadata
Metadata
Assignees
Labels
C-datetimeComponent: datetime, calendars, time zonesComponent: datetime, calendars, time zonesU-temporalUser: Temporal and V8User: Temporal and V8