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

fixed formatting issue #536

Merged
merged 1 commit into from
Mar 18, 2019
Merged

fixed formatting issue #536

merged 1 commit into from
Mar 18, 2019

Conversation

waseemahmad31
Copy link
Contributor

Fixed issue #533

Got Invalid Date when use customParseFormat parse.

@codecov-io
Copy link

codecov-io commented Mar 17, 2019

Codecov Report

Merging #536 into dev will not change coverage.
The diff coverage is 100%.

Impacted file tree graph

@@         Coverage Diff         @@
##            dev   #536   +/-   ##
===================================
  Coverage   100%   100%           
===================================
  Files        70     70           
  Lines       663    663           
  Branches    114    114           
===================================
  Hits        663    663
Impacted Files Coverage Δ
src/plugin/customParseFormat/index.js 100% <100%> (ø) ⬆️

Continue to review full report at Codecov.

Legend - Click here to learn more
Δ = absolute <relative> (impact), ø = not affected, ? = missing data
Powered by Codecov. Last update eeb20fa...9b3ba88. Read the comment docs.

@@ -9,7 +9,7 @@ const matchUpperCaseAMPM = /[AP]M/
const matchLowerCaseAMPM = /[ap]m/
const matchSigned = /[+-]?\d+/ // -inf - inf
const matchOffset = /[+-]\d\d:?\d\d/ // +00:00 -00:00 +0000 or -0000
const matchWord = /\d*[^\s\d]+/ // Word
const matchWord = /\d*[^\s\d-:/.()]+/ // Word
Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Good fix.

Do we need to list more possible divider (such as \ / _ etc, I'm not sure)?

Copy link
Contributor Author

@waseemahmad31 waseemahmad31 Mar 17, 2019

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Yes, we can include if we are considering them as the format separator, in this case, we also need to modify

const formattingTokens = /(\[[^[]*\])|([-:/.()\s]+)|(A|a|YYYY|YY?|MM?M?M?|Do|DD?|hh?|HH?|mm?|ss?|S{1,3}|z|ZZ?)/g
.

Should I include these dividers("_" and "\")?

Copy link
Owner

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Not sure, to be honest.

Maybe we could add these later but not this time. 😬

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks @iamkun. :)

@iamkun iamkun merged commit 8578546 into iamkun:dev Mar 18, 2019
iamkun pushed a commit that referenced this pull request 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 PR is included in version 1.8.11 🎉

The release is available on:

Your semantic-release bot 📦🚀

andrewhood125ruhuc added a commit to andrewhood125ruhuc/SidRH2 that referenced this pull request 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 pull request 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))
allmoviestvshowslistsfilmography28 added a commit to allmoviestvshowslistsfilmography28/dayjs that referenced this pull request Sep 12, 2024
## [1.8.11](iamkun/dayjs@v1.8.10...v1.8.11) (2019-03-21)

### Bug Fixes

* Add .add('quarter') .startOf('quarter') through plugin quarterOfYear ([764b0ce](iamkun/dayjs@764b0ce)), closes [#537](iamkun/dayjs#537) [#531](iamkun/dayjs#531)
* Add locale support for Azerbaijani language (az) ([#535](iamkun/dayjs#535)) ([078556a](iamkun/dayjs@078556a))
* Correct typescript definition `add` ([d03d7e9](iamkun/dayjs@d03d7e9)), closes [#531](iamkun/dayjs#531)
* Fix CustomParseFormat plugin formatting bug ([#536](iamkun/dayjs#536)) ([dcb2b9b](iamkun/dayjs@dcb2b9b)), closes [#533](iamkun/dayjs#533)
* Update pt locale ([#538](iamkun/dayjs#538)) ([7c188fa](iamkun/dayjs@7c188fa))
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 this pull request may close these issues.

3 participants