File tree Expand file tree Collapse file tree 2 files changed +6
-1
lines changed
Expand file tree Collapse file tree 2 files changed +6
-1
lines changed Original file line number Diff line number Diff line change @@ -8,7 +8,7 @@ const locale = {
88 weekdaysMin : 'zo_ma_di_wo_do_vr_za' . split ( '_' ) ,
99 months : 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december' . split ( '_' ) ,
1010 monthsShort : 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec' . split ( '_' ) ,
11- ordinal : n => `${ n } ${ n === 1 || n === 8 || n >= 20 ? 'ste' : 'de' } ` ,
11+ ordinal : n => `[ ${ n } ${ n === 1 || n === 8 || n >= 20 ? 'ste' : 'de' } ] ` ,
1212 weekStart : 1 ,
1313 yearStart : 4 ,
1414 formats : {
Original file line number Diff line number Diff line change @@ -8,6 +8,7 @@ import weekYear from '../../src/plugin/weekYear'
88import timezone from '../../src/plugin/timezone'
99import utc from '../../src/plugin/utc'
1010import '../../src/locale/zh-cn'
11+ import '../../src/locale/nl'
1112
1213dayjs . extend ( utc )
1314dayjs . extend ( timezone )
@@ -51,12 +52,16 @@ it('Format Day of Month Do 1 - 31', () => {
5152 expect ( dayjs ( d ) . format ( 'Do' ) ) . toBe ( moment ( d ) . format ( 'Do' ) )
5253 d = '2018-05-04 00:00:00.000'
5354 expect ( dayjs ( d ) . format ( 'Do' ) ) . toBe ( moment ( d ) . format ( 'Do' ) )
55+ d = '2018-05-08 00:00:00.000'
56+ expect ( dayjs ( d ) . locale ( 'nl' ) . format ( 'Do' ) ) . toBe ( moment ( d ) . locale ( 'nl' ) . format ( 'Do' ) )
5457 d = '2018-05-11'
5558 expect ( dayjs ( d ) . format ( 'Do' ) ) . toBe ( moment ( d ) . format ( 'Do' ) )
5659 d = '2018-05-12'
5760 expect ( dayjs ( d ) . format ( 'Do' ) ) . toBe ( moment ( d ) . format ( 'Do' ) )
5861 d = '2018-05-13'
5962 expect ( dayjs ( d ) . format ( 'Do' ) ) . toBe ( moment ( d ) . format ( 'Do' ) )
63+ d = '2018-05-19 00:00:00.000'
64+ expect ( dayjs ( d ) . locale ( 'nl' ) . format ( 'Do' ) ) . toBe ( moment ( d ) . locale ( 'nl' ) . format ( 'Do' ) )
6065 d = '2018-05-22'
6166 expect ( dayjs ( d ) . format ( 'Do' ) ) . toBe ( moment ( d ) . format ( 'Do' ) )
6267} )
You can’t perform that action at this time.
0 commit comments