Skip to content

Instantly share code, notes, and snippets.

@nicolasdanelon
Created July 17, 2018 14:36
Show Gist options
  • Save nicolasdanelon/fb5b029b5d33d290bf80fa370cd7b46b to your computer and use it in GitHub Desktop.
Save nicolasdanelon/fb5b029b5d33d290bf80fa370cd7b46b to your computer and use it in GitHub Desktop.
moment - meses abreviados en español - shot months spanish
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) });
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