Created
July 17, 2018 14:36
-
-
Save nicolasdanelon/fb5b029b5d33d290bf80fa370cd7b46b to your computer and use it in GitHub Desktop.
moment - meses abreviados en español - shot months spanish
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import moment from 'moment'; | |
import momentEs from 'moment/locale/es'; | |
moment.updateLocale(momentEs); | |
const monthsShort = ['ene', 'feb', 'mar', 'abr', 'may', 'jun', 'jul', 'ago', 'sep', 'oct', 'nov', 'dic']; | |
moment.updateLocale('es', { monthsShort: m => (m ? monthsShort[m.month()] : monthsShort) }); |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
import moment from 'moment'; | |
import momentEs from 'moment/locale/es'; | |
moment.updateLocale(momentEs); | |
const monthsShort = 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'); | |
moment.updateLocale('es', { monthsShort: m => (m ? monthsShort[m.month()] : monthsShort) }); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment