vremel
Version:
JavaScript date utility library for Temporal API
11 lines • 381 B
JavaScript
/**
* Returns an integer of microseconds from Unix epoch until the exact time which the given temporal object represents.
*
* @param dt Temporal object
* @returns epoch microseconds
*/
export function epochMicroseconds(dt) {
return ((dt.epochNanoseconds - (((dt.epochNanoseconds % 1000n) + 1000n) % 1000n)) /
1000n);
}
//# sourceMappingURL=epochMicroseconds.js.map