(year: number, month: number, day: number, mins: number,
tz: MaintenanceWindow['tz'])
| 76 | }; |
| 77 | |
| 78 | const 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 |