(days: number)
| 585 | } |
| 586 | |
| 587 | const formatDate = (days: number): string => { |
| 588 | const { day, month, year } = civilFromDays(days) |
| 589 | const yearText = year < 0 |
| 590 | ? `-${pad(-year, 4)}` |
| 591 | : year < 10000 |
| 592 | ? twoDigits[(year / 100) | 0] + twoDigits[year % 100] |
| 593 | : String(year) |
| 594 | return `${yearText}-${twoDigits[month]}-${twoDigits[day]}` |
| 595 | } |
| 596 | |
| 597 | const timeRegex = /^(\d{1,2}):(\d{2})(?::(\d{2})(?:\.(\d{1,6}))?)?$/ |
| 598 |
no test coverage detected