-
-
Notifications
You must be signed in to change notification settings - Fork 2.3k
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
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #536 +/- ##
===================================
Coverage 100% 100%
===================================
Files 70 70
Lines 663 663
Branches 114 114
===================================
Hits 663 663
Continue to review full report at Codecov.
|
@@ -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 |
There was a problem hiding this comment.
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)?
There was a problem hiding this comment.
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 "\")?
There was a problem hiding this comment.
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. 😬
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Thanks @iamkun. :)
## [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))
🎉 This PR is included in version 1.8.11 🎉 The release is available on: Your semantic-release bot 📦🚀 |
## [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))
## [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))
## [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))
Fixed issue #533
Got Invalid Date when use customParseFormat parse.