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

chitgoks picture chitgoks  ·  3Comments

IbraheemAlSaady picture IbraheemAlSaady  ·  3Comments

dogukankotan picture dogukankotan  ·  3Comments

dbshwang picture dbshwang  ·  3Comments

benhathaway picture benhathaway  ·  3Comments