(date: AnyDateTime)
| 29 | import {Mutable} from './utils'; |
| 30 | |
| 31 | export function epochFromDate(date: AnyDateTime): number { |
| 32 | date = toCalendar(date, new GregorianCalendar()); |
| 33 | let year = getExtendedYear(date.era, date.year); |
| 34 | return epochFromParts( |
| 35 | year, |
| 36 | date.month, |
| 37 | date.day, |
| 38 | date.hour, |
| 39 | date.minute, |
| 40 | date.second, |
| 41 | date.millisecond |
| 42 | ); |
| 43 | } |
| 44 | |
| 45 | function epochFromParts( |
| 46 | year: number, |
no test coverage detected