vremel
Version:
JavaScript date utility library for Temporal API
10 lines • 407 B
JavaScript
/**
* Returns the start of a second for the given datetime
* @param dt datetime object which includes time info
* @returns Temporal object which represents the start of a second
*/
export function startOfSecond(dt) {
// assumption: no sub-second offset transition in timezone database
return dt.with({ millisecond: 0, microsecond: 0, nanosecond: 0 });
}
//# sourceMappingURL=startOfSecond.js.map