Function
formatCommandTimestamp
(value: number, locale: SupportedLocale)
Source from the content-addressed store, hash-verified
| 21369 | } |
| 21370 | |
| 21371 | function formatCommandTimestamp(value: number, locale: SupportedLocale): string { |
| 21372 | return new Intl.DateTimeFormat(locale === 'zh-CN' ? 'zh-CN' : 'en-US', { |
| 21373 | year: 'numeric', |
| 21374 | month: '2-digit', |
| 21375 | day: '2-digit', |
| 21376 | hour: '2-digit', |
| 21377 | minute: '2-digit', |
| 21378 | second: '2-digit', |
| 21379 | hour12: false, |
| 21380 | timeZone: 'UTC', |
| 21381 | timeZoneName: 'short', |
| 21382 | }).format(new Date(value)); |
| 21383 | } |
| 21384 | |
| 21385 | function formatErrorMessage(error: unknown): string { |
| 21386 | if (error instanceof Error && error.message) { |
Tested by
no test coverage detected