mirror of
https://github.com/LadybirdBrowser/ladybird.git
synced 2025-07-31 05:09:12 +00:00
LibJS: Update Date AOs to use Temporal
Neglected to do this after the Temporal rewrite. This lets us eliminate the duplicated GetUTCEpochNanoseconds definition in Temporal.
This commit is contained in:
parent
5764eeab05
commit
ea52952774
Notes:
github-actions[bot]
2025-03-01 13:50:51 +00:00
Author: https://github.com/trflynn89
Commit: ea52952774
Pull-request: https://github.com/LadybirdBrowser/ladybird/pull/3734
9 changed files with 47 additions and 56 deletions
|
@ -1907,21 +1907,6 @@ ThrowCompletionOr<u64> get_rounding_increment_option(VM& vm, Object const& optio
|
|||
return static_cast<u64>(integer_increment);
|
||||
}
|
||||
|
||||
// 14.5.1 GetUTCEpochNanoseconds ( isoDateTime ), https://tc39.es/proposal-temporal/#sec-getutcepochnanoseconds
|
||||
Crypto::SignedBigInteger get_utc_epoch_nanoseconds(ISODateTime const& iso_date_time)
|
||||
{
|
||||
return JS::get_utc_epoch_nanoseconds(
|
||||
iso_date_time.iso_date.year,
|
||||
iso_date_time.iso_date.month,
|
||||
iso_date_time.iso_date.day,
|
||||
iso_date_time.time.hour,
|
||||
iso_date_time.time.minute,
|
||||
iso_date_time.time.second,
|
||||
iso_date_time.time.millisecond,
|
||||
iso_date_time.time.microsecond,
|
||||
iso_date_time.time.nanosecond);
|
||||
}
|
||||
|
||||
// AD-HOC
|
||||
// FIXME: We should add a generic floor() method to our BigInt classes. But for now, since we know we are only dividing
|
||||
// by powers of 10, we can implement a very situationally specific method to compute the floor of a division.
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue