Skip to content

Commit 0564dca

Browse files
committed
Editorial: Remove use of nonexistent [[TotalNanoseconds]] field
These are two lingering references to when time durations were a Record with a [[TotalNanoseconds]] field. Closes: #3021 UPSTREAM_COMMIT=6b3ca826668f5d05134e1ba508d0cbfffc22ae5a
1 parent 407e9a1 commit 0564dca

File tree

1 file changed

+2
-1
lines changed

1 file changed

+2
-1
lines changed

lib/zoneddatetime.ts

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -311,7 +311,8 @@ export class ZonedDateTime implements Temporal.ZonedDateTime {
311311

312312
const dayLengthNs = JSBI.subtract(endNs, startNs);
313313
const dayProgressNs = TimeDuration.fromEpochNsDiff(thisNs, startNs);
314-
epochNanoseconds = dayProgressNs.round(dayLengthNs, roundingMode).add(new TimeDuration(startNs)).totalNs;
314+
const roundedDayNs = dayProgressNs.round(dayLengthNs, roundingMode);
315+
epochNanoseconds = roundedDayNs.addToEpochNs(startNs);
315316
} else {
316317
// smallestUnit < day
317318
// Round based on ISO-calendar time units

0 commit comments

Comments
 (0)