Skip to content

Commit

Permalink
titlecase short-forms
Browse files Browse the repository at this point in the history
  • Loading branch information
spencermountain committed Dec 14, 2018
1 parent daaf992 commit 5913562
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
2 changes: 2 additions & 0 deletions changelog.md
Original file line number Diff line number Diff line change
Expand Up @@ -77,3 +77,5 @@
* uppercase month and day names in `.dayName()`
* support city-names, `EST`, `PDT`, etc as input
* set default `silent: true` to avoid unwanted logging
### 5.1.0
* titlecase short-forms of months, days in `.format()`
4 changes: 2 additions & 2 deletions src/methods/format/index.js
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,7 @@ const isoOffset = require('./_offset');

const format = {
day: (s) => fns.titleCase(s.dayName()),
'day-short': (s) => days.short()[s.day()],
'day-short': (s) => fns.titleCase(days.short()[s.day()]),
'day-number': (s) => s.day(),
'day-ordinal': (s) => fns.ordinal(s.day()),
'day-pad': (s) => fns.zeroPad(s.day()),
Expand All @@ -16,7 +16,7 @@ const format = {
'date-pad': s => fns.zeroPad(s.date()),

month: (s) => fns.titleCase(s.monthName()),
'month-short': (s) => months.short()[s.month()],
'month-short': (s) => fns.titleCase(months.short()[s.month()]),
'month-number': (s) => s.month(),
'month-ordinal': (s) => fns.ordinal(s.month()),
'month-pad': (s) => fns.zeroPad(s.month()),
Expand Down

0 comments on commit 5913562

Please sign in to comment.