Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

parseDate error from recent release. #979

Closed
Junyan opened this issue Aug 3, 2020 · 5 comments · Fixed by #980
Closed

parseDate error from recent release. #979

Junyan opened this issue Aug 3, 2020 · 5 comments · Fixed by #980
Labels

Comments

@Junyan
Copy link

Junyan commented Aug 3, 2020

Describe the bug
from #969

// v1.8.30
export var REGEX_PARSE = /^(\d{4})-?(\d{1,2})-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/;


// v1.8.31
export var REGEX_PARSE = /^(\d{4})-?(\d{1,2})?-?(\d{0,2})[^0-9]*(\d{1,2})?:?(\d{1,2})?:?(\d{1,2})?.?(\d{1,3})?$/;

result:
image

// v1.8.31
dayjs('2020/9/30').format(); // result: 2020-01-01T09:00:00+08:00

Expected behavior

// v1.8.30
dayjs('2020/9/30').format(); // result: 2020-09-30T00:00:00+08:00

Information

  • Day.js Version [e.g. v1.8.31]
@iamkun
Copy link
Owner

iamkun commented Aug 3, 2020

Thanks, fixed in #980 (comment)

@dyoshikawa
Copy link
Contributor

I'm sorry the new bug.
Thank you for reporting and fixing.

iamkun pushed a commit that referenced this issue Aug 4, 2020
## [1.8.32](v1.8.31...v1.8.32) (2020-08-04)

### Bug Fixes

* Add Experimental Timezone Plugin ([#974](#974)) ([e69caba](e69caba))
* fix parse date string error e.g. '2020/9/30' ([#980](#980)) ([231790d](231790d)), closes [#979](#979)
* update monthDiff function to get more accurate results ([19e8a7f](19e8a7f))
* Update UTC plugin to support keepLocalTime ([#973](#973)) ([9f488e5](9f488e5))
@iamkun
Copy link
Owner

iamkun commented Aug 4, 2020

🎉 This issue has been resolved in version 1.8.32 🎉

The release is available on:

Your semantic-release bot 📦🚀

@iamkun iamkun added the released label Aug 4, 2020
@yyfearth
Copy link

Still has issue with invalid date string, like dayjs('2020/222') will results 2021-10-02T07:00:00.000Z
Which I expecting it return Invalid Date

@iamkun
Copy link
Owner

iamkun commented Sep 10, 2020

@yyfearth #980 (comment)

andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this issue May 10, 2022
## [1.8.32](iamkun/dayjs@v1.8.31...v1.8.32) (2020-08-04)

### Bug Fixes

* Add Experimental Timezone Plugin ([#974](iamkun/dayjs#974)) ([e69caba](iamkun/dayjs@e69caba))
* fix parse date string error e.g. '2020/9/30' ([#980](iamkun/dayjs#980)) ([231790d](iamkun/dayjs@231790d)), closes [#979](iamkun/dayjs#979)
* update monthDiff function to get more accurate results ([19e8a7f](iamkun/dayjs@19e8a7f))
* Update UTC plugin to support keepLocalTime ([#973](iamkun/dayjs#973)) ([9f488e5](iamkun/dayjs@9f488e5))
andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this issue May 10, 2022
## [1.8.32](iamkun/dayjs@v1.8.31...v1.8.32) (2020-08-04)

### Bug Fixes

* Add Experimental Timezone Plugin ([#974](iamkun/dayjs#974)) ([e69caba](iamkun/dayjs@e69caba))
* fix parse date string error e.g. '2020/9/30' ([#980](iamkun/dayjs#980)) ([231790d](iamkun/dayjs@231790d)), closes [#979](iamkun/dayjs#979)
* update monthDiff function to get more accurate results ([19e8a7f](iamkun/dayjs@19e8a7f))
* Update UTC plugin to support keepLocalTime ([#973](iamkun/dayjs#973)) ([9f488e5](iamkun/dayjs@9f488e5))
allmoviestvshowslistsfilmography28 added a commit to allmoviestvshowslistsfilmography28/dayjs that referenced this issue Sep 12, 2024
## [1.8.32](iamkun/dayjs@v1.8.31...v1.8.32) (2020-08-04)

### Bug Fixes

* Add Experimental Timezone Plugin ([#974](iamkun/dayjs#974)) ([f68f866](iamkun/dayjs@f68f866))
* fix parse date string error e.g. '2020/9/30' ([#980](iamkun/dayjs#980)) ([4f64e9f](iamkun/dayjs@4f64e9f)), closes [#979](iamkun/dayjs#979)
* update monthDiff function to get more accurate results ([7afd8eb](iamkun/dayjs@7afd8eb))
* Update UTC plugin to support keepLocalTime ([#973](iamkun/dayjs#973)) ([4bc8429](iamkun/dayjs@4bc8429))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants