I have two Instant objects, and need to get one Duration object. How would I do this in JavaScript?
const start = Temporal.now.instant();
await doLongOperation();
const finish = Temporal.now.instant();
const duration = ... ?
I have two Instant objects, and need to get one Duration object. How would I do this in JavaScript?
const start = Temporal.now.instant();
await doLongOperation();
const finish = Temporal.now.instant();
const duration = ... ?
Copyright © 2021 Jogjafile Inc.
You can use either
.until()or.since()methods of aTemporal.Instantobject.Until:
Since: