Skip to content

Commit eda87c1

Browse files
committed
refactored date formatting
1 parent 5a2d40c commit eda87c1

File tree

1 file changed

+1
-4
lines changed

1 file changed

+1
-4
lines changed

functions/src/email/helpers.ts

Lines changed: 1 addition & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,11 +24,8 @@ export function isDefined(v: unknown) {
2424

2525
export function formatDate(timestamp: Date) {
2626
const date = new Date(timestamp)
27-
const month = String(date.getMonth() + 1).padStart(2, "0")
28-
const day = String(date.getDate()).padStart(2, "0")
29-
const year = date.getFullYear()
3027

31-
return `${month}/${day}/${year}`
28+
return date.toLocaleDateString()
3229
}
3330

3431
export function minusFour(value: number) {

0 commit comments

Comments
 (0)