|
|
|
|
|
by QGQBGdeZREunxLe
96 days ago
|
|
Noticed that converting between certain calendars is not supported. Was that choice intentional? const today = Temporal.PlainDate.from("2569-03-11[u-ca=buddhist]");
today.toLocaleString("en", { calendar: "hebrew" });
> Uncaught RangeError: calendars "buddhist" and "hebrew" aren't compatible
|
|
All of which means there are many potential ambiguities in converting between calendars, and the combinatorial explosion possible means they probably only want you to convert between non-ISO8601 calendars and ISO8601. It would be too easy to get corner cases wrong otherwise and not notice, I'm sure. So to convert a date from Buddhist calender to Hebrew calender, you'd probably have to do Buddhist -> ISO8601, then ISO8601 -> Hebrew. (I haven't had time to test that for myself yet, I'll post a correction if that turns out to be wrong).