Skip to content

Commit

Permalink
Merge pull request #2024 from iamkun/dev
Browse files Browse the repository at this point in the history
D2M
  • Loading branch information
iamkun committed Aug 12, 2022
2 parents fdf648b + 6c2a517 commit 78df01b
Show file tree
Hide file tree
Showing 4 changed files with 9 additions and 2 deletions.
2 changes: 2 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -114,6 +114,8 @@ Support this project by becoming a sponsor. Your logo will show up here with a l
        
<a href="https://github.com/vendure-ecommerce" target="_blank"><img width="70" src="https://avatars.githubusercontent.com/u/39629390?s=52&v=4"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/dc7290" target="_blank"><img width="70" src="https://avatars.githubusercontent.com/u/48201151?v=4"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/Velc" target="_blank"><img width="70" src="https://avatars.githubusercontent.com/u/1551649?s=52&v=4"></a>
&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;
<a href="https://github.com/projectdiscovery" target="_blank"><img width="70" src="https://avatars.githubusercontent.com/u/50994705?s=52&v=4"></a>
Expand Down
2 changes: 1 addition & 1 deletion src/locale/fr.js
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ const locale = {
yy: '%d ans'
},
ordinal: (n) => {
const o = n === 1 ? 'er' : 'e'
const o = n === 1 ? 'er' : ''
return `${n}${o}`
}
}
Expand Down
2 changes: 1 addition & 1 deletion src/locale/nl.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ const locale = {
weekdaysMin: 'zo_ma_di_wo_do_vr_za'.split('_'),
months: 'januari_februari_maart_april_mei_juni_juli_augustus_september_oktober_november_december'.split('_'),
monthsShort: 'jan_feb_mrt_apr_mei_jun_jul_aug_sep_okt_nov_dec'.split('_'),
ordinal: n => `${n}${n === 1 || n === 8 || n >= 20 ? 'ste' : 'de'}`,
ordinal: n => `[${n}${n === 1 || n === 8 || n >= 20 ? 'ste' : 'de'}]`,
weekStart: 1,
yearStart: 4,
formats: {
Expand Down
5 changes: 5 additions & 0 deletions test/plugin/advancedFormat.test.js
Original file line number Diff line number Diff line change
Expand Up @@ -8,6 +8,7 @@ import weekYear from '../../src/plugin/weekYear'
import timezone from '../../src/plugin/timezone'
import utc from '../../src/plugin/utc'
import '../../src/locale/zh-cn'
import '../../src/locale/nl'

dayjs.extend(utc)
dayjs.extend(timezone)
Expand Down Expand Up @@ -51,12 +52,16 @@ it('Format Day of Month Do 1 - 31', () => {
expect(dayjs(d).format('Do')).toBe(moment(d).format('Do'))
d = '2018-05-04 00:00:00.000'
expect(dayjs(d).format('Do')).toBe(moment(d).format('Do'))
d = '2018-05-08 00:00:00.000'
expect(dayjs(d).locale('nl').format('Do')).toBe(moment(d).locale('nl').format('Do'))
d = '2018-05-11'
expect(dayjs(d).format('Do')).toBe(moment(d).format('Do'))
d = '2018-05-12'
expect(dayjs(d).format('Do')).toBe(moment(d).format('Do'))
d = '2018-05-13'
expect(dayjs(d).format('Do')).toBe(moment(d).format('Do'))
d = '2018-05-19 00:00:00.000'
expect(dayjs(d).locale('nl').format('Do')).toBe(moment(d).locale('nl').format('Do'))
d = '2018-05-22'
expect(dayjs(d).format('Do')).toBe(moment(d).format('Do'))
})
Expand Down

0 comments on commit 78df01b

Please sign in to comment.