We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 9201a29 commit bdefa3bCopy full SHA for bdefa3b
src/lib/utils.ts
@@ -0,0 +1,11 @@
1
+export const formatDate = (date: Date) => {
2
+ const formatter = new Intl.DateTimeFormat('en-US', {
3
+ year: 'numeric',
4
+ month: 'short',
5
+ day: 'numeric',
6
+ timeZone: 'UTC', // Default to UTC to prevent timezone issues
7
+ });
8
+
9
+ // Ensure we're parsing the date correctly
10
+ return formatter.format(new Date(date));
11
+}
0 commit comments