Skip to content

Commit 9c20e77

Browse files
authored
fix: update Spanish [es] locale to change month names to lowercase (#1414)
1 parent b1abdc4 commit 9c20e77

File tree

5 files changed

+17
-17
lines changed

5 files changed

+17
-17
lines changed

src/locale/es-do.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const locale = {
66
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
77
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
88
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
9-
months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
9+
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
1010
monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
1111
weekStart: 1,
1212
relativeTime: {

src/locale/es-pr.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const locale = {
77
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
88
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
99
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
10-
months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
10+
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
1111
weekStart: 1,
1212
formats: {
1313
LT: 'h:mm A',

src/locale/es-us.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ const locale = {
66
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
77
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
88
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
9-
months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
9+
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
1010
monthsShort: 'ene_feb_mar_abr_may_jun_jul_ago_sep_oct_nov_dic'.split('_'),
1111
relativeTime: {
1212
future: 'en %s',

src/locale/es.js

+1-1
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@ const locale = {
77
weekdays: 'domingo_lunes_martes_miércoles_jueves_viernes_sábado'.split('_'),
88
weekdaysShort: 'dom._lun._mar._mié._jue._vie._sáb.'.split('_'),
99
weekdaysMin: 'do_lu_ma_mi_ju_vi_sá'.split('_'),
10-
months: 'Enero_Febrero_Marzo_Abril_Mayo_Junio_Julio_Agosto_Septiembre_Octubre_Noviembre_Diciembre'.split('_'),
10+
months: 'enero_febrero_marzo_abril_mayo_junio_julio_agosto_septiembre_octubre_noviembre_diciembre'.split('_'),
1111
weekStart: 1,
1212
formats: {
1313
LT: 'H:mm',

test/locale.test.js

+13-13
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ const NOT_SUPPORTED_LOCALE_STRING = 'not_supported_locale_string'
1717
it('Uses spanish locale through constructor', () => { // not recommend
1818
expect(dayjs('2018-4-28', { locale: es })
1919
.format(format))
20-
.toBe('sábado 28, Abril')
20+
.toBe('sábado 28, abril')
2121
})
2222

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

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

3232
expect(dayjs('2018-4-28')
3333
.format(format))
@@ -40,7 +40,7 @@ it('set global locale', () => {
4040
.toBe('Saturday 28, April')
4141
dayjs.locale(es)
4242
expect(dayjs('2018-4-28').format(format))
43-
.toBe('sábado 28, Abril')
43+
.toBe('sábado 28, abril')
4444
dayjs.locale('en')
4545
expect(dayjs('2018-4-28').format(format))
4646
.toBe('Saturday 28, April')
@@ -63,10 +63,10 @@ it('immutable instance locale', () => {
6363
expect(origin.format(format))
6464
.toBe('Saturday 28, April')
6565
expect(origin.locale('es').format(format))
66-
.toBe('sábado 28, Abril')
66+
.toBe('sábado 28, abril')
6767
const changed = origin.locale('es')
6868
expect(changed.format(format))
69-
.toBe('sábado 28, Abril')
69+
.toBe('sábado 28, abril')
7070
expect(origin.format(format))
7171
.toBe('Saturday 28, April')
7272
})
@@ -86,30 +86,30 @@ describe('Instance locale inheritance', () => {
8686

8787
it('Clone', () => {
8888
expect(esDayjs.clone().format(format))
89-
.toBe('sábado 28, Abril')
89+
.toBe('sábado 28, abril')
9090
expect(dayjs(esDayjs).format(format))
91-
.toBe('sábado 28, Abril')
91+
.toBe('sábado 28, abril')
9292
})
9393

9494
it('StartOf EndOf', () => {
9595
expect(esDayjs.startOf('year').format(format))
96-
.toBe('lunes 1, Enero')
96+
.toBe('lunes 1, enero')
9797
expect(esDayjs.endOf('day').format(format))
98-
.toBe('sábado 28, Abril')
98+
.toBe('sábado 28, abril')
9999
})
100100

101101
it('Set', () => {
102102
expect(esDayjs.set('year', 2017).format(format))
103-
.toBe('viernes 28, Abril')
103+
.toBe('viernes 28, abril')
104104
})
105105

106106
it('Add', () => {
107107
expect(esDayjs.add(1, 'year').format(format))
108-
.toBe('domingo 28, Abril')
108+
.toBe('domingo 28, abril')
109109
expect(esDayjs.add(1, 'month').format(format))
110-
.toBe('lunes 28, Mayo')
110+
.toBe('lunes 28, mayo')
111111
expect(esDayjs.add(1, 'minute').format(format))
112-
.toBe('sábado 28, Abril')
112+
.toBe('sábado 28, abril')
113113
})
114114

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

0 commit comments

Comments
 (0)