|
@@ -1,6 +1,6 @@
|
|
export const formatTimestamp = (
|
|
export const formatTimestamp = (
|
|
timestamp?: number | string | Date,
|
|
timestamp?: number | string | Date,
|
|
- format: Intl.DateTimeFormatOptions = { hour12: false }
|
|
|
|
|
|
+ format: Intl.DateTimeFormatOptions = { hourCycle: 'h23' }
|
|
): string => {
|
|
): string => {
|
|
if (!timestamp) {
|
|
if (!timestamp) {
|
|
return '';
|
|
return '';
|
|
@@ -8,7 +8,6 @@ export const formatTimestamp = (
|
|
|
|
|
|
// empty array gets the default one from the browser
|
|
// empty array gets the default one from the browser
|
|
const date = new Date(timestamp);
|
|
const date = new Date(timestamp);
|
|
-
|
|
|
|
// invalid date
|
|
// invalid date
|
|
if (Number.isNaN(date.getTime())) {
|
|
if (Number.isNaN(date.getTime())) {
|
|
return '';
|
|
return '';
|