Skip to content

Commit

Permalink
Month names (MMMM) returns incorrect names (#41)
Browse files Browse the repository at this point in the history
Changed mmm, mmmm and MMMM flag to use the month index value (M) instead of minutes (m) to return correct month names.
  • Loading branch information
liprec authored and ignatvilesov committed Jan 9, 2019
1 parent 86c5692 commit bf4304c
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/date/dateFormatter.ts
Original file line number Diff line number Diff line change
Expand Up @@ -76,9 +76,9 @@ export default class DateFormatter {
dddd: dF.i18n.dayNames[D + 7],
m: m,
mm: DateFormatter.pad(m),
mmm: dF.i18n.monthNames[m],
mmmm: dF.i18n.monthNames[m + 12],
MMMM: dF.i18n.monthNames[m + 12],
mmm: dF.i18n.monthNames[M],
mmmm: dF.i18n.monthNames[M + 12],
MMMM: dF.i18n.monthNames[M + 12],
MMM: dF.i18n.monthNames[M],
yy: String(y).slice(2),
yyyy: y,
Expand All @@ -105,4 +105,4 @@ export default class DateFormatter {
return $0 in flags ? flags[$0] : $0.slice(1, $0.length - 1);
});
}
}
}

0 comments on commit bf4304c

Please sign in to comment.