(date: Date | number | string)
| 386 | } |
| 387 | |
| 388 | static formatDate(date: Date | number | string) { |
| 389 | if (!(date instanceof Date)) { |
| 390 | date = new Date(date); |
| 391 | } |
| 392 | const formatter = Intl.DateTimeFormat('en-US', { |
| 393 | weekday: 'short', |
| 394 | year: 'numeric', |
| 395 | month: 'short', |
| 396 | day: '2-digit', |
| 397 | hour: '2-digit', |
| 398 | hour12: false, |
| 399 | minute: '2-digit', |
| 400 | second: '2-digit', |
| 401 | timeZoneName: 'short', |
| 402 | }); |
| 403 | return formatter.format(date).replace(/,/g, ''); |
| 404 | } |
| 405 | |
| 406 | static formatDateCompact(date: Date | number | string) { |
| 407 | if (!(date instanceof Date)) { |
no outgoing calls