LibJS: Implement Temporal.PlainDateTime.prototype.with* methods

Includes with, withCalendar, and withPlainTime.
This commit is contained in:
Timothy Flynn 2024-11-23 19:09:38 -05:00 committed by Andreas Kling
commit 990daaf63a
Notes: github-actions[bot] 2024-11-24 10:45:09 +00:00
7 changed files with 232 additions and 0 deletions

View file

@ -53,6 +53,7 @@ Time midnight_time_record();
Time noon_time_record();
TimeDuration difference_time(Time const&, Time const&);
ThrowCompletionOr<GC::Ref<PlainTime>> to_temporal_time(VM&, Value item, Value options = js_undefined());
ThrowCompletionOr<Time> to_time_record_or_midnight(VM&, Value item);
ThrowCompletionOr<Time> regulate_time(VM&, double hour, double minute, double second, double millisecond, double microsecond, double nanosecond, Overflow);
bool is_valid_time(double hour, double minute, double second, double millisecond, double microsecond, double nanosecond);
Time balance_time(double hour, double minute, double second, double millisecond, double microsecond, double nanosecond);