Skip to content

Commit

Permalink
Fix day and month numbers in toDateFormat (#1557)
Browse files Browse the repository at this point in the history
  • Loading branch information
danjm authored May 12, 2020
1 parent a016c96 commit 424fb74
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions app/util/date.js
Original file line number Diff line number Diff line change
Expand Up @@ -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) {
Expand Down

0 comments on commit 424fb74

Please sign in to comment.