| // Copyright (C) 2021 Igalia, S.L. All rights reserved. |
| // This code is governed by the BSD license found in the LICENSE file. |
| |
| /*--- |
| esid: sec-temporal.instant.prototype.since |
| description: Rounding for roundingIncrement option |
| info: | |
| sec-temporal-totemporalroundingincrement step 7: |
| 7. Set _increment_ to floor(ℝ(_increment_)). |
| includes: [temporalHelpers.js] |
| features: [Temporal] |
| ---*/ |
| |
| const earlier = new Temporal.Instant(1_000_000_000_000_000_000n); |
| const later = new Temporal.Instant(1_000_000_000_000_000_005n); |
| const result = later.since(earlier, { roundingIncrement: 2.5 }); |
| TemporalHelpers.assertDuration(result, 0, 0, 0, 0, 0, 0, 0, 0, 0, 4, "roundingIncrement 2.5 floors to 2"); |