Skip to content

Commit 4eff794

Browse files
authored
Fix day and month numbers in toDateFormat (#1557)
1 parent b7a8ff7 commit 4eff794

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

app/util/date.js

+2-2
Original file line numberDiff line numberDiff line change
@@ -9,8 +9,8 @@ export function toLocaleDateTime(timestamp) {
99

1010
export function toDateFormat(timestamp) {
1111
const dateObj = new Date(timestamp);
12-
const month = strings(`date.months.${dateObj.getDay()}`);
13-
const day = dateObj.getMonth();
12+
const month = strings(`date.months.${dateObj.getMonth()}`);
13+
const day = dateObj.getDate();
1414
let meridiem = 'am';
1515
let hour = dateObj.getHours();
1616
if (hour > 12) {

0 commit comments

Comments
 (0)