Skip to content

Commit

Permalink
fix: update Spanish [es] locale to change month names to lowercase (#…
Browse files Browse the repository at this point in the history
  • Loading branch information
jamilchioino committed Mar 15, 2021
1 parent b1abdc4 commit 9c20e77
Show file tree
Hide file tree
Showing 5 changed files with 17 additions and 17 deletions.
2 changes: 1 addition & 1 deletion src/locale/es-do.js
Expand Up @@ -6,7 +6,7 @@ const locale = {
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
weekStart: 1,
relativeTime: {
Expand Down
2 changes: 1 addition & 1 deletion src/locale/es-pr.js
Expand Up @@ -7,7 +7,7 @@ const locale = {
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
weekStart: 1,
formats: {
LT: 'h:mm A',
Expand Down
2 changes: 1 addition & 1 deletion src/locale/es-us.js
Expand Up @@ -6,7 +6,7 @@ const locale = {
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
relativeTime: {
future: 'en %s',
Expand Down
2 changes: 1 addition & 1 deletion src/locale/es.js
Expand Up @@ -7,7 +7,7 @@ const locale = {
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
weekStart: 1,
formats: {
LT: 'H:mm',
Expand Down
26 changes: 13 additions & 13 deletions test/locale.test.js
Expand Up @@ -17,7 +17,7 @@ const NOT_SUPPORTED_LOCALE_STRING = 'not_supported_locale_string'
it('Uses spanish locale through constructor', () => { // not recommend
expect(dayjs('2018-4-28', { locale: es })
.format(format))
.toBe('sábado 28, Abril')
.toBe('sábado 28, abril')
})

it('set locale for one instance only', () => {
Expand All @@ -27,7 +27,7 @@ it('set locale for one instance only', () => {

expect(dayjs('2018-4-28')
.locale(es).format(format))
.toBe('sábado 28, Abril')
.toBe('sábado 28, abril')

expect(dayjs('2018-4-28')
.format(format))
Expand All @@ -40,7 +40,7 @@ it('set global locale', () => {
.toBe('Saturday 28, April')
dayjs.locale(es)
expect(dayjs('2018-4-28').format(format))
.toBe('sábado 28, Abril')
.toBe('sábado 28, abril')
dayjs.locale('en')
expect(dayjs('2018-4-28').format(format))
.toBe('Saturday 28, April')
Expand All @@ -63,10 +63,10 @@ it('immutable instance locale', () => {
expect(origin.format(format))
.toBe('Saturday 28, April')
expect(origin.locale('es').format(format))
.toBe('sábado 28, Abril')
.toBe('sábado 28, abril')
const changed = origin.locale('es')
expect(changed.format(format))
.toBe('sábado 28, Abril')
.toBe('sábado 28, abril')
expect(origin.format(format))
.toBe('Saturday 28, April')
})
Expand All @@ -86,30 +86,30 @@ describe('Instance locale inheritance', () => {

it('Clone', () => {
expect(esDayjs.clone().format(format))
.toBe('sábado 28, Abril')
.toBe('sábado 28, abril')
expect(dayjs(esDayjs).format(format))
.toBe('sábado 28, Abril')
.toBe('sábado 28, abril')
})

it('StartOf EndOf', () => {
expect(esDayjs.startOf('year').format(format))
.toBe('lunes 1, Enero')
.toBe('lunes 1, enero')
expect(esDayjs.endOf('day').format(format))
.toBe('sábado 28, Abril')
.toBe('sábado 28, abril')
})

it('Set', () => {
expect(esDayjs.set('year', 2017).format(format))
.toBe('viernes 28, Abril')
.toBe('viernes 28, abril')
})

it('Add', () => {
expect(esDayjs.add(1, 'year').format(format))
.toBe('domingo 28, Abril')
.toBe('domingo 28, abril')
expect(esDayjs.add(1, 'month').format(format))
.toBe('lunes 28, Mayo')
.toBe('lunes 28, mayo')
expect(esDayjs.add(1, 'minute').format(format))
.toBe('sábado 28, Abril')
.toBe('sábado 28, abril')
})

it('dayjs.locale() returns locale name', () => {
Expand Down

0 comments on commit 9c20e77

Please sign in to comment.