LibJS: Swap arguments in invocation to AddTimeDurationToEpochNanoseconds

This is an editorial change in the Temporal proposal. See:
630b043

This also changes the second argument of this AO to not use the alias of
TimeDuration, as that should not be used to refer to epoch nanoseconds.
This was missed in commit 2d9405e5d7.
This commit is contained in:
Timothy Flynn 2024-12-05 10:01:21 -05:00 committed by Tim Flynn
commit 46c3406008
Notes: github-actions[bot] 2024-12-05 21:06:48 +00:00
3 changed files with 4 additions and 4 deletions

View file

@ -734,7 +734,7 @@ ThrowCompletionOr<TimeDuration> add_24_hour_days_to_time_duration(VM& vm, TimeDu
}
// 7.5.24 AddTimeDurationToEpochNanoseconds ( d, epochNs ), https://tc39.es/proposal-temporal/#sec-temporal-addtimedurationtoepochnanoseconds
TimeDuration add_time_duration_to_epoch_nanoseconds(TimeDuration const& duration, TimeDuration const& epoch_nanoseconds)
Crypto::SignedBigInteger add_time_duration_to_epoch_nanoseconds(TimeDuration const& duration, Crypto::SignedBigInteger const& epoch_nanoseconds)
{
// 1. Return epochNs + (d).
return epoch_nanoseconds.plus(duration);