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

Duration.toISOString() returns wrong result #888

Closed
eslepova opened this issue Apr 28, 2020 · 2 comments · Fixed by #889
Closed

Duration.toISOString() returns wrong result #888

eslepova opened this issue Apr 28, 2020 · 2 comments · Fixed by #889
Labels

Comments

@eslepova
Copy link

eslepova commented Apr 28, 2020

Describe the bug
dayjs.duration(dayjs.duration(1, 'minutes').toISOString()).as('minutes') returns 43200
dayjs.duration(1, 'minutes').toISOString() return 'P1M'

Expected behavior
Should return 1
Suppose that dayjs.duration(1, 'minutes').toISOString() should return 'PT1M'

Information

  • Day.js Version [1.8.24]
  • OS: [macOS Mojave 10.14.6]
  • Browser [chrome 81.0.4044.122 (Official Build) (64-bit)]
  • Time zone: [GMT+3 (Moscow Standard Time)]
@iamkun
Copy link
Owner

iamkun commented Apr 28, 2020

Thanks, will fix soon

iamkun added a commit that referenced this issue Apr 28, 2020
* fix: Fix Duration Plugin `.toISOString` format bug

fix #888

* test: Update RelativeTime plugin test
iamkun pushed a commit that referenced this issue Apr 30, 2020
## [1.8.26](v1.8.25...v1.8.26) (2020-04-30)

### Bug Fixes

* Fix Duration plugin `.toISOString` format bug ([#889](#889)) ([058d624](058d624)), closes [#888](#888)
* Fix WeekOfYear plugin bug while using BadMutable plugin ([#884](#884)) ([2977438](2977438))
* Update CustomParseFormat plugin strict mode ([#882](#882)) ([db642ac](db642ac))
* Update RelativeTime plugin default config ([#883](#883)) ([0606f42](0606f42))
@iamkun
Copy link
Owner

iamkun commented Apr 30, 2020

🎉 This issue has been resolved in version 1.8.26 🎉

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.26](iamkun/dayjs@v1.8.25...v1.8.26) (2020-04-30)

### Bug Fixes

* Fix Duration plugin `.toISOString` format bug ([#889](iamkun/dayjs#889)) ([058d624](iamkun/dayjs@058d624)), closes [#888](iamkun/dayjs#888)
* Fix WeekOfYear plugin bug while using BadMutable plugin ([#884](iamkun/dayjs#884)) ([2977438](iamkun/dayjs@2977438))
* Update CustomParseFormat plugin strict mode ([#882](iamkun/dayjs#882)) ([db642ac](iamkun/dayjs@db642ac))
* Update RelativeTime plugin default config ([#883](iamkun/dayjs#883)) ([0606f42](iamkun/dayjs@0606f42))
andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this issue May 10, 2022
## [1.8.26](iamkun/dayjs@v1.8.25...v1.8.26) (2020-04-30)

### Bug Fixes

* Fix Duration plugin `.toISOString` format bug ([#889](iamkun/dayjs#889)) ([058d624](iamkun/dayjs@058d624)), closes [#888](iamkun/dayjs#888)
* Fix WeekOfYear plugin bug while using BadMutable plugin ([#884](iamkun/dayjs#884)) ([2977438](iamkun/dayjs@2977438))
* Update CustomParseFormat plugin strict mode ([#882](iamkun/dayjs#882)) ([db642ac](iamkun/dayjs@db642ac))
* Update RelativeTime plugin default config ([#883](iamkun/dayjs#883)) ([0606f42](iamkun/dayjs@0606f42))
splashwizard pushed a commit to splashwizard/tracking-time that referenced this issue Oct 21, 2024
## [1.8.26](iamkun/dayjs@v1.8.25...v1.8.26) (2020-04-30)

### Bug Fixes

* Fix Duration plugin `.toISOString` format bug ([#889](iamkun/dayjs#889)) ([058d624](iamkun/dayjs@058d624)), closes [#888](iamkun/dayjs#888)
* Fix WeekOfYear plugin bug while using BadMutable plugin ([#884](iamkun/dayjs#884)) ([2977438](iamkun/dayjs@2977438))
* Update CustomParseFormat plugin strict mode ([#882](iamkun/dayjs#882)) ([db642ac](iamkun/dayjs@db642ac))
* Update RelativeTime plugin default config ([#883](iamkun/dayjs#883)) ([0606f42](iamkun/dayjs@0606f42))
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