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

the result of dayjs("2019-02", "YYYY-MM") is wrong #761

Closed
kingller opened this issue Dec 30, 2019 · 3 comments · Fixed by BlueWallet/BlueWallet#862 · May be fixed by cds-snc/apply-for-a-grant#32
Closed

the result of dayjs("2019-02", "YYYY-MM") is wrong #761

kingller opened this issue Dec 30, 2019 · 3 comments · Fixed by BlueWallet/BlueWallet#862 · May be fixed by cds-snc/apply-for-a-grant#32
Labels

Comments

@kingller
Copy link

Describe the bug

import dayjs from "dayjs";
import customParseFormat from "dayjs/plugin/customParseFormat";
dayjs.extend(customParseFormat);

2019-02 dayjs format: {dayjs("2019-02", "YYYY-MM").format("YYYY-MM")}

result: 2019-03
expected: 2019-02

Information

  • Day.js Version 1.1.18
  • OS: mac
  • Browser: chrome 79.0.3945.88
  • Time: 2019-12-30T15:30:00+08:00

Reproduce address: https://codesandbox.io/s/gifted-feynman-bshbk?fontsize=14&hidenavigation=1&theme=dark

@iamkun iamkun closed this as completed in ba709ec Dec 30, 2019
@iamkun
Copy link
Owner

iamkun commented Dec 30, 2019

Thanks. Will fix in next release

@kingller
Copy link
Author

When will it be released?

iamkun pushed a commit that referenced this issue Jan 6, 2020
## [1.8.19](v1.8.18...v1.8.19) (2020-01-06)

### Bug Fixes

* Add UpdateLocale plugin to update a locale's properties ([#766](#766)) ([82ce2ba](82ce2ba))
* Fix CustomParseFormat Plugin 'YYYY-MM' use first day of the month ([ba709ec](ba709ec)), closes [#761](#761)
* Fix CustomParseFormat Plugin to set correct locale ([66ce23f](66ce23f))
* Fix WeekOfYear Plugin wrong calender week number bug ([79b86db](79b86db)), closes [#760](#760)
* Update RelativeTime plugin to support function to make additional processing ([#767](#767)) ([4bd9250](4bd9250))
* Update ru, uk, cs locale to support relativeTime with plural ([3f080f7](3f080f7))
@iamkun
Copy link
Owner

iamkun commented Jan 6, 2020

🎉 This issue has been resolved in version 1.8.19 🎉

The release is available on:

Your semantic-release bot 📦🚀

@iamkun iamkun added the released label Jan 6, 2020
andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this issue May 10, 2022
## [1.8.19](iamkun/dayjs@v1.8.18...v1.8.19) (2020-01-06)

### Bug Fixes

* Add UpdateLocale plugin to update a locale's properties ([#766](iamkun/dayjs#766)) ([82ce2ba](iamkun/dayjs@82ce2ba))
* Fix CustomParseFormat Plugin 'YYYY-MM' use first day of the month ([ba709ec](iamkun/dayjs@ba709ec)), closes [#761](iamkun/dayjs#761)
* Fix CustomParseFormat Plugin to set correct locale ([66ce23f](iamkun/dayjs@66ce23f))
* Fix WeekOfYear Plugin wrong calender week number bug ([79b86db](iamkun/dayjs@79b86db)), closes [#760](iamkun/dayjs#760)
* Update RelativeTime plugin to support function to make additional processing ([#767](iamkun/dayjs#767)) ([4bd9250](iamkun/dayjs@4bd9250))
* Update ru, uk, cs locale to support relativeTime with plural ([3f080f7](iamkun/dayjs@3f080f7))
andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this issue May 10, 2022
## [1.8.19](iamkun/dayjs@v1.8.18...v1.8.19) (2020-01-06)

### Bug Fixes

* Add UpdateLocale plugin to update a locale's properties ([#766](iamkun/dayjs#766)) ([82ce2ba](iamkun/dayjs@82ce2ba))
* Fix CustomParseFormat Plugin 'YYYY-MM' use first day of the month ([ba709ec](iamkun/dayjs@ba709ec)), closes [#761](iamkun/dayjs#761)
* Fix CustomParseFormat Plugin to set correct locale ([66ce23f](iamkun/dayjs@66ce23f))
* Fix WeekOfYear Plugin wrong calender week number bug ([79b86db](iamkun/dayjs@79b86db)), closes [#760](iamkun/dayjs#760)
* Update RelativeTime plugin to support function to make additional processing ([#767](iamkun/dayjs#767)) ([4bd9250](iamkun/dayjs@4bd9250))
* Update ru, uk, cs locale to support relativeTime with plural ([3f080f7](iamkun/dayjs@3f080f7))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
2 participants