We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e84318d commit 3da28e6Copy full SHA for 3da28e6
src/utils/date.ts
@@ -0,0 +1,7 @@
1
+export function formatDate(date: Date): string {
2
+ const year = date.getFullYear();
3
+ const month = String(date.getMonth() + 1).padStart(2, '0');
4
+ const day = String(date.getDate()).padStart(2, '0');
5
+
6
+ return `${year}-${month}-${day}`;
7
+}
0 commit comments