iamkun / iamkun/dayjs

Error parsing string

Open
#933 1 comment 1 reaction 0 assignees View on GitHub
Dominant language
JavaScript
Stars
48.7k
Forks
2.5k
PR merge metrics
No merged PRs in 30d

Description

**Describe the bug**
Just found this bug on my app, dayjs can't parse the string right, even when i'm forcing the format.
I'm trying to parse the string '02022000'. Got working using something to separate the numbers.

![image](https://user-images.githubusercontent.com/816098/85014048-f2a04d00-b13b-11ea-830e-ab6e1dc22700.png)

Just used the devtools on https://day.js.org/ to get the image above

**Expected behavior**
I would expect to use `dayjs('02022000', 'DDMMYYYY').format('DD/MM/YYYY')` and get `02/02/2000`

![image](https://user-images.githubusercontent.com/816098/85015116-d0a7ca00-b13d-11ea-8536-3fccd6f135e4.png)

**Information**
- Day.js Version: v1.8.27
- OS: Windows 10
- Browser: Chrome 83.0.4103.106
- Time zone: GMT -3

Contributor guide

Open the contributing guide

Assessment

This issue has not been assessed yet.

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.