MCPcopy Create free account
hub / github.com/ether/etherpad / buildAt

Function buildAt

src/node/updater/MaintenanceWindow.ts:78–85  ·  view source on GitHub ↗
(year: number, month: number, day: number, mins: number,
                 tz: MaintenanceWindow['tz'])

Source from the content-addressed store, hash-verified

76};
77
78const buildAt = (year: number, month: number, day: number, mins: number,
79 tz: MaintenanceWindow['tz']): Date => {
80 const h = Math.floor(mins / 60);
81 const mm = mins % 60;
82 return tz === 'utc'
83 ? new Date(Date.UTC(year, month, day, h, mm, 0, 0))
84 : new Date(year, month, day, h, mm, 0, 0);
85};
86
87/**
88 * Smallest `Date` `t` such that `t >= now` and `t`'s wall-clock equals

Callers 1

nextWindowStartFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected