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

CustomParseFormat: Issue with parsing dates in 'D-MM-YYYY' format #915

Closed
janb87 opened this issue May 25, 2020 · 2 comments · Fixed by #918
Closed

CustomParseFormat: Issue with parsing dates in 'D-MM-YYYY' format #915

janb87 opened this issue May 25, 2020 · 2 comments · Fixed by #918
Labels

Comments

@janb87
Copy link

janb87 commented May 25, 2020

Describe the bug

import dayjs from 'dayjs';
import customParseFormat from 'dayjs/plugin/customParseFormat';

dayjs.extend(customParseFormat);

const date = dayjs('21-Dec-18', 'D-MMM-YY').toJSON()
// Date is Sun Jan 21 2018

Expected behavior
Date is Sun Dec 21 2018

Information

  • Day.js Version: v1.8.27 (The issue does not exist on v1.8.26)
  • OS: macOS Catalina
  • Node.js version: v12
  • Time zone: GMT+2 Central European Summer Time
@iamkun
Copy link
Owner

iamkun commented May 28, 2020

fixed thanks

iamkun pushed a commit that referenced this issue May 28, 2020
## [1.8.28](v1.8.27...v1.8.28) (2020-05-28)

### Bug Fixes

* Fix CustomParseFormat plugin month index error ([#918](#918)) ([fa2ec7f](fa2ec7f)), closes [#915](#915)
* Update Ukrainian (uk) locale monthFormat and monthStandalone ([#899](#899)) ([a08756e](a08756e))
@iamkun
Copy link
Owner

iamkun commented May 28, 2020

🎉 This issue has been resolved in version 1.8.28 🎉

The release is available on:

Your semantic-release bot 📦🚀

andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this issue May 10, 2022
## [1.8.28](iamkun/dayjs@v1.8.27...v1.8.28) (2020-05-28)

### Bug Fixes

* Fix CustomParseFormat plugin month index error ([#918](iamkun/dayjs#918)) ([fa2ec7f](iamkun/dayjs@fa2ec7f)), closes [#915](iamkun/dayjs#915)
* Update Ukrainian (uk) locale monthFormat and monthStandalone ([#899](iamkun/dayjs#899)) ([a08756e](iamkun/dayjs@a08756e))
andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this issue May 10, 2022
## [1.8.28](iamkun/dayjs@v1.8.27...v1.8.28) (2020-05-28)

### Bug Fixes

* Fix CustomParseFormat plugin month index error ([#918](iamkun/dayjs#918)) ([fa2ec7f](iamkun/dayjs@fa2ec7f)), closes [#915](iamkun/dayjs#915)
* Update Ukrainian (uk) locale monthFormat and monthStandalone ([#899](iamkun/dayjs#899)) ([a08756e](iamkun/dayjs@a08756e))
splashwizard pushed a commit to splashwizard/tracking-time that referenced this issue Oct 21, 2024
## [1.8.28](iamkun/dayjs@v1.8.27...v1.8.28) (2020-05-28)

### Bug Fixes

* Fix CustomParseFormat plugin month index error ([#918](iamkun/dayjs#918)) ([fa2ec7f](iamkun/dayjs@fa2ec7f)), closes [#915](iamkun/dayjs#915)
* Update Ukrainian (uk) locale monthFormat and monthStandalone ([#899](iamkun/dayjs#899)) ([a08756e](iamkun/dayjs@a08756e))
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.

2 participants