aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/util.ts9
1 files changed, 8 insertions, 1 deletions
diff --git a/src/util.ts b/src/util.ts
index f7f9018..81a1e18 100644
--- a/src/util.ts
+++ b/src/util.ts
@@ -1,6 +1,13 @@
// Format date to a string
function formatDate(date: Date): string {
- const options: Intl.DateTimeFormatOptions = { year: 'numeric', month: 'long', day: 'numeric' };
+ const options: Intl.DateTimeFormatOptions = {
+ year: 'numeric',
+ month: 'long',
+ day: 'numeric',
+ hour: '2-digit',
+ minute: '2-digit',
+ timeZone: Intl.DateTimeFormat().resolvedOptions().timeZone
+ };
return new Date(date).toLocaleDateString(undefined, options);
}