From 424fb74d6a58fe76b82495eda55b37dd5617cc6b Mon Sep 17 00:00:00 2001 From: Dan J Miller Date: Tue, 12 May 2020 17:26:28 -0230 Subject: [PATCH] Fix day and month numbers in toDateFormat (#1557) --- app/util/date.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/app/util/date.js b/app/util/date.js index bde111ceded..119362e7045 100644 --- a/app/util/date.js +++ b/app/util/date.js @@ -9,8 +9,8 @@ export function toLocaleDateTime(timestamp) { export function toDateFormat(timestamp) { const dateObj = new Date(timestamp); - const month = strings(`date.months.${dateObj.getDay()}`); - const day = dateObj.getMonth(); + const month = strings(`date.months.${dateObj.getMonth()}`); + const day = dateObj.getDate(); let meridiem = 'am'; let hour = dateObj.getHours(); if (hour > 12) {