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

[Bug]customParseFormat Zone Error #849

Closed
dreamllq opened this issue Mar 24, 2020 · 3 comments · Fixed by #873
Closed

[Bug]customParseFormat Zone Error #849

dreamllq opened this issue Mar 24, 2020 · 3 comments · Fixed by #873
Labels

Comments

@dreamllq
Copy link

parse error

in:
  dayjs("2001 +08:00", 'YYYY Z').format()
out:
  "Invalid Date"
in:
  dayjs("2001-01 +08:00", 'YYYY-MM Z').format()
out:
  "Invalid Date"
in:
  dayjs("2001-01-02 +08:00", 'YYYY-MM-DD Z').format()
out:
  "2001-01-02T00:00:00+08:00"

Information

  • Day.js v1.8.21
  • OS: Mac 10.14.6
  • Browser chrome 80.0.3987.149
  • Time zone: GMT+0800 (中国标准时间)
@iamkun
Copy link
Owner

iamkun commented Mar 24, 2020

Have you import the CustomParseFormat plugin first? https://day.js.org/docs/en/parse/string-format

@dreamllq
Copy link
Author

yes, i have import this file.
if i do not import, example 3 will not work .

iamkun pushed a commit that referenced this issue Apr 21, 2020
## [1.8.25](v1.8.24...v1.8.25) (2020-04-21)

### Bug Fixes

* Fix CustomParseFormat plugin of parsing only YYYY / YYYY-MM bug ([#873](#873)) ([3cea04d](3cea04d)), closes [#849](#849)
* Fix Duration plugin get seconds ([#867](#867)) ([62b092d](62b092d))
* Fix type definition of locale ([9790b85](9790b85))
* Fix UTC plugin startOf, endOf bug ([#872](#872)) ([4141084](4141084)), closes [#809](#809) [#808](#808)
@iamkun
Copy link
Owner

iamkun commented Apr 21, 2020

🎉 This issue has been resolved in version 1.8.25 🎉

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.25](iamkun/dayjs@v1.8.24...v1.8.25) (2020-04-21)

### Bug Fixes

* Fix CustomParseFormat plugin of parsing only YYYY / YYYY-MM bug ([#873](iamkun/dayjs#873)) ([3cea04d](iamkun/dayjs@3cea04d)), closes [#849](iamkun/dayjs#849)
* Fix Duration plugin get seconds ([#867](iamkun/dayjs#867)) ([62b092d](iamkun/dayjs@62b092d))
* Fix type definition of locale ([9790b85](iamkun/dayjs@9790b85))
* Fix UTC plugin startOf, endOf bug ([#872](iamkun/dayjs#872)) ([4141084](iamkun/dayjs@4141084)), closes [#809](iamkun/dayjs#809) [#808](iamkun/dayjs#808)
andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this issue May 10, 2022
## [1.8.25](iamkun/dayjs@v1.8.24...v1.8.25) (2020-04-21)

### Bug Fixes

* Fix CustomParseFormat plugin of parsing only YYYY / YYYY-MM bug ([#873](iamkun/dayjs#873)) ([3cea04d](iamkun/dayjs@3cea04d)), closes [#849](iamkun/dayjs#849)
* Fix Duration plugin get seconds ([#867](iamkun/dayjs#867)) ([62b092d](iamkun/dayjs@62b092d))
* Fix type definition of locale ([9790b85](iamkun/dayjs@9790b85))
* Fix UTC plugin startOf, endOf bug ([#872](iamkun/dayjs#872)) ([4141084](iamkun/dayjs@4141084)), closes [#809](iamkun/dayjs#809) [#808](iamkun/dayjs#808)
splashwizard pushed a commit to splashwizard/tracking-time that referenced this issue Oct 21, 2024
## [1.8.25](iamkun/dayjs@v1.8.24...v1.8.25) (2020-04-21)

### Bug Fixes

* Fix CustomParseFormat plugin of parsing only YYYY / YYYY-MM bug ([#873](iamkun/dayjs#873)) ([3cea04d](iamkun/dayjs@3cea04d)), closes [#849](iamkun/dayjs#849)
* Fix Duration plugin get seconds ([#867](iamkun/dayjs#867)) ([62b092d](iamkun/dayjs@62b092d))
* Fix type definition of locale ([9790b85](iamkun/dayjs@9790b85))
* Fix UTC plugin startOf, endOf bug ([#872](iamkun/dayjs#872)) ([4141084](iamkun/dayjs@4141084)), closes [#809](iamkun/dayjs#809) [#808](iamkun/dayjs#808)
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