LibJS: Implement Temporal.Instant.prototype.add/subtract/equals

This commit is contained in:
Timothy Flynn 2024-11-24 16:31:17 -05:00 committed by Andreas Kling
commit 1d67f28e72
Notes: github-actions[bot] 2024-11-25 12:34:16 +00:00
7 changed files with 226 additions and 0 deletions

View file

@ -60,7 +60,9 @@ bool is_valid_epoch_nanoseconds(Crypto::SignedBigInteger const& epoch_nanosecond
ThrowCompletionOr<GC::Ref<Instant>> create_temporal_instant(VM&, BigInt const& epoch_nanoseconds, GC::Ptr<FunctionObject> new_target = {});
ThrowCompletionOr<GC::Ref<Instant>> to_temporal_instant(VM&, Value item);
i8 compare_epoch_nanoseconds(Crypto::SignedBigInteger const& epoch_nanoseconds_one, Crypto::SignedBigInteger const& epoch_nanoseconds_two);
ThrowCompletionOr<Crypto::SignedBigInteger> add_instant(VM&, Crypto::SignedBigInteger const& epoch_nanoseconds, TimeDuration const&);
Crypto::SignedBigInteger round_temporal_instant(Crypto::SignedBigInteger const& nanoseconds, u64 increment, Unit, RoundingMode);
String temporal_instant_to_string(Instant const&, Optional<StringView> time_zone, SecondsStringPrecision::Precision);
ThrowCompletionOr<GC::Ref<Instant>> add_duration_to_instant(VM&, ArithmeticOperation, Instant const&, Value temporal_duration_like);
}