mirror of
https://github.com/appwrite/console.git
synced 2026-11-18 20:47:21 +00:00
fix: remove 12 hour format
This commit is contained in:
1 parent
df2b59b2ff
commit
0342610128
1 file changed
+8
-2
@@ -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);
|
||||
|
||||
Reference in new issue
Block a user