fix: remove 12 hour format

This commit is contained in:
Arman committed 2022-07-08 10:43:36 +02:00
1 parent df2b59b2ff
commit 0342610128
1 file changed
+8 -2
+8 -2
View File
@@ -1,6 +1,11 @@
export const toLocaleDate = (timestamp: number) => {
const date = new Date(timestamp * 1000);
const options: Intl.DateTimeFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' };
const options: Intl.DateTimeFormatOptions = {
year: 'numeric',
month: 'long',
day: 'numeric',
hour12: false
};
return date.toLocaleDateString('en', options);
};
@@ -12,7 +17,8 @@ export const toLocaleDateTime = (timestamp: number) => {
month: 'long',
day: 'numeric',
hour: 'numeric',
minute: 'numeric'
minute: 'numeric',
hour12: false
};
return date.toLocaleDateString('en', options);