We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent 457c435 commit e02ae82Copy full SHA for e02ae82
test/browser.spec.js
@@ -20,10 +20,12 @@ describe('Core APIs', function () {
20
.format('{YYYY} MM-DDTHH:mm:ss')).toBe('{2010} 04-25T00:00:00')
21
})
22
23
- it('Date parse - nonstandard date string with only one digit', function () {
24
- expect(dayjs('2018-4-1 1:1:1:22').isValid())
25
- .toBe(true)
26
- expect(dayjs('2018-4-1').isValid())
27
+ it('Date parse - nonstandard date string', function () {
+ expect(dayjs('2018-4-1 1:1:1:22').format('YYYY-MM-DD hh:mm:ss'))
+ .toBe('2018-04-01 01:01:01')
+ expect(dayjs('2018-4-1').format('YYYY-MM-DD hh:mm:ss'))
+ .toBe('2018-04-01 12:00:00')
28
+ expect(dayjs('2018-4-1 11:49').format('YYYY-MM-DD hh:mm:ss')) // fix ios bug
29
+ .toBe('2018-04-01 11:49:00')
30
31
0 commit comments