Moment: Recommended way to get uppercase short month name?

Created on 2 May 2013  路  3Comments  路  Source: moment/moment

To get this format 02-MAY-2013 I'm currently doing this:

moment().format('DD-MMM-YYYY').toUpperCase();

Is there a better way?

I'm aware that I could introduce some custom month abbreviations, but I currently only want to apply the formatting to this instance of the date.

All 3 comments

Yep, that's the best way!

Thanks.

:/

Was this page helpful?
0 / 5 - 0 ratings

Related issues

danieljsinclair picture danieljsinclair  路  3Comments

alvarotrigo picture alvarotrigo  路  3Comments

slavafomin picture slavafomin  路  3Comments

M-Zuber picture M-Zuber  路  3Comments

BCup picture BCup  路  3Comments