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

dayjs().startOf('quarter') do not work right #537

Closed
xuefei007 opened this issue Mar 18, 2019 · 2 comments
Closed

dayjs().startOf('quarter') do not work right #537

xuefei007 opened this issue Mar 18, 2019 · 2 comments
Labels

Comments

@xuefei007
Copy link

Describe the bug
dayjs().startOf('quarter') do not return the beginning of the current quarter, 1st day of months, 12:00 am but current date

Expected behavior
the beginning of the current quarter, 1st day of months, 12:00 am

Information

  • Day.js Version [e.g. v1.0.0]
  • OS: [e.g. iOS]
  • Browser [e.g. chrome 62]
@iamkun iamkun closed this as completed in dde39e9 Mar 21, 2019
@iamkun
Copy link
Owner

iamkun commented Mar 21, 2019

Thanks.

Please use our QuarterOfYear plugin to get full quarter support after version 1.8.11.

import quarterOfYear from 'dayjs/plugin/quarterOfYear'

dayjs.extend(quarterOfYear)

dayjs().startOf('quarter') 
dayjs().add(1, 'quarter')

https://github.com/iamkun/dayjs/blob/dev/docs/en/Plugin.md#quarterofyear

iamkun pushed a commit that referenced this issue Mar 21, 2019
## [1.8.11](v1.8.10...v1.8.11) (2019-03-21)

### Bug Fixes

* Add .add('quarter') .startOf('quarter') through plugin quarterOfYear ([dde39e9](dde39e9)), closes [#537](#537) [#531](#531)
* Add locale support for Azerbaijani language (az) ([#535](#535)) ([eeb20fa](eeb20fa))
* Correct typescript definition `add` ([22a249c](22a249c)), closes [#531](#531)
* Fix CustomParseFormat plugin formatting bug ([#536](#536)) ([8578546](8578546)), closes [#533](#533)
* Update pt locale ([#538](#538)) ([1ac9e1e](1ac9e1e))
@iamkun
Copy link
Owner

iamkun commented Mar 21, 2019

🎉 This issue has been resolved in version 1.8.11 🎉

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.11](iamkun/dayjs@v1.8.10...v1.8.11) (2019-03-21)

### Bug Fixes

* Add .add('quarter') .startOf('quarter') through plugin quarterOfYear ([dde39e9](iamkun/dayjs@dde39e9)), closes [#537](iamkun/dayjs#537) [#531](iamkun/dayjs#531)
* Add locale support for Azerbaijani language (az) ([#535](iamkun/dayjs#535)) ([eeb20fa](iamkun/dayjs@eeb20fa))
* Correct typescript definition `add` ([22a249c](iamkun/dayjs@22a249c)), closes [#531](iamkun/dayjs#531)
* Fix CustomParseFormat plugin formatting bug ([#536](iamkun/dayjs#536)) ([8578546](iamkun/dayjs@8578546)), closes [#533](iamkun/dayjs#533)
* Update pt locale ([#538](iamkun/dayjs#538)) ([1ac9e1e](iamkun/dayjs@1ac9e1e))
andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this issue May 10, 2022
## [1.8.11](iamkun/dayjs@v1.8.10...v1.8.11) (2019-03-21)

### Bug Fixes

* Add .add('quarter') .startOf('quarter') through plugin quarterOfYear ([dde39e9](iamkun/dayjs@dde39e9)), closes [#537](iamkun/dayjs#537) [#531](iamkun/dayjs#531)
* Add locale support for Azerbaijani language (az) ([#535](iamkun/dayjs#535)) ([eeb20fa](iamkun/dayjs@eeb20fa))
* Correct typescript definition `add` ([22a249c](iamkun/dayjs@22a249c)), closes [#531](iamkun/dayjs#531)
* Fix CustomParseFormat plugin formatting bug ([#536](iamkun/dayjs#536)) ([8578546](iamkun/dayjs@8578546)), closes [#533](iamkun/dayjs#533)
* Update pt locale ([#538](iamkun/dayjs#538)) ([1ac9e1e](iamkun/dayjs@1ac9e1e))
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

No branches or pull requests

2 participants