(self: DurationInput)
| 346 | * @category getters |
| 347 | */ |
| 348 | export const toWeeks = (self: DurationInput): number => |
| 349 | match(self, { |
| 350 | onMillis: (millis) => millis / 604_800_000, |
| 351 | onNanos: (nanos) => Number(nanos) / 604_800_000_000_000 |
| 352 | }) |
| 353 | |
| 354 | /** |
| 355 | * Get the duration in nanoseconds as a bigint. |