Add option callback to calendar plugin#839
Merged
iamkun merged 1 commit intoiamkun:devfrom Mar 24, 2020
Merged
Conversation
Codecov Report
@@ Coverage Diff @@
## dev #839 +/- ##
=========================================
Coverage 100.00% 100.00%
=========================================
Files 157 158 +1
Lines 1148 1195 +47
Branches 216 243 +27
=========================================
+ Hits 1148 1195 +47
Continue to review full report at Codecov.
|
Owner
|
Thanks. Plus, I'd like to keep the callback the same as moment.js. Could you please add more test to test it's Cheers. |
9ec5dad to
1e9ee26
Compare
Owner
1e9ee26 to
fa29548
Compare
Contributor
Author
|
Fixed @iamkun ! |
Owner
|
THX |
iamkun
pushed a commit
that referenced
this pull request
Apr 10, 2020
## [1.8.24](v1.8.23...v1.8.24) (2020-04-10) ### Bug Fixes * Add config option to RelativeTime plugin ([#851](#851)) ([bd24034](bd24034)) * add Duration plugin ([#858](#858)) ([d568273](d568273)) * Add en-in, en-tt locales ([#855](#855)) ([c39fb96](c39fb96)) * add isToday, isTomorrow, isYesterday plugins ([#857](#857)) ([fc08ab6](fc08ab6)) * Add option callback to Calendar plugin ([#839](#839)) ([b25be90](b25be90)) * Fix monthsShort for locale fr ([#862](#862)) ([d2de9a0](d2de9a0)) * Update Breton locale (br) meridiem config ([#856](#856)) ([a2a6672](a2a6672)) * Update Ukrainian (uk) locale relative time ([#842](#842)) ([578bc1a](578bc1a))
Owner
|
🎉 This PR is included in version 1.8.24 🎉 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.24](iamkun/dayjs@v1.8.23...v1.8.24) (2020-04-10) ### Bug Fixes * Add config option to RelativeTime plugin ([#851](iamkun/dayjs#851)) ([bd24034](iamkun/dayjs@bd24034)) * add Duration plugin ([#858](iamkun/dayjs#858)) ([d568273](iamkun/dayjs@d568273)) * Add en-in, en-tt locales ([#855](iamkun/dayjs#855)) ([c39fb96](iamkun/dayjs@c39fb96)) * add isToday, isTomorrow, isYesterday plugins ([#857](iamkun/dayjs#857)) ([fc08ab6](iamkun/dayjs@fc08ab6)) * Add option callback to Calendar plugin ([#839](iamkun/dayjs#839)) ([b25be90](iamkun/dayjs@b25be90)) * Fix monthsShort for locale fr ([#862](iamkun/dayjs#862)) ([d2de9a0](iamkun/dayjs@d2de9a0)) * Update Breton locale (br) meridiem config ([#856](iamkun/dayjs#856)) ([a2a6672](iamkun/dayjs@a2a6672)) * Update Ukrainian (uk) locale relative time ([#842](iamkun/dayjs#842)) ([578bc1a](iamkun/dayjs@578bc1a))
andrewhood125ruhuc
added a commit
to andrewhood125ruhuc/SidRH2
that referenced
this pull request
May 10, 2022
## [1.8.24](iamkun/dayjs@v1.8.23...v1.8.24) (2020-04-10) ### Bug Fixes * Add config option to RelativeTime plugin ([#851](iamkun/dayjs#851)) ([bd24034](iamkun/dayjs@bd24034)) * add Duration plugin ([#858](iamkun/dayjs#858)) ([d568273](iamkun/dayjs@d568273)) * Add en-in, en-tt locales ([#855](iamkun/dayjs#855)) ([c39fb96](iamkun/dayjs@c39fb96)) * add isToday, isTomorrow, isYesterday plugins ([#857](iamkun/dayjs#857)) ([fc08ab6](iamkun/dayjs@fc08ab6)) * Add option callback to Calendar plugin ([#839](iamkun/dayjs#839)) ([b25be90](iamkun/dayjs@b25be90)) * Fix monthsShort for locale fr ([#862](iamkun/dayjs#862)) ([d2de9a0](iamkun/dayjs@d2de9a0)) * Update Breton locale (br) meridiem config ([#856](iamkun/dayjs#856)) ([a2a6672](iamkun/dayjs@a2a6672)) * Update Ukrainian (uk) locale relative time ([#842](iamkun/dayjs#842)) ([578bc1a](iamkun/dayjs@578bc1a))
splashwizard
pushed a commit
to splashwizard/tracking-time
that referenced
this pull request
Oct 21, 2024
## [1.8.24](iamkun/dayjs@v1.8.23...v1.8.24) (2020-04-10) ### Bug Fixes * Add config option to RelativeTime plugin ([#851](iamkun/dayjs#851)) ([bd24034](iamkun/dayjs@bd24034)) * add Duration plugin ([#858](iamkun/dayjs#858)) ([d568273](iamkun/dayjs@d568273)) * Add en-in, en-tt locales ([#855](iamkun/dayjs#855)) ([c39fb96](iamkun/dayjs@c39fb96)) * add isToday, isTomorrow, isYesterday plugins ([#857](iamkun/dayjs#857)) ([fc08ab6](iamkun/dayjs@fc08ab6)) * Add option callback to Calendar plugin ([#839](iamkun/dayjs#839)) ([b25be90](iamkun/dayjs@b25be90)) * Fix monthsShort for locale fr ([#862](iamkun/dayjs#862)) ([d2de9a0](iamkun/dayjs@d2de9a0)) * Update Breton locale (br) meridiem config ([#856](iamkun/dayjs#856)) ([a2a6672](iamkun/dayjs@a2a6672)) * Update Ukrainian (uk) locale relative time ([#842](iamkun/dayjs#842)) ([578bc1a](iamkun/dayjs@578bc1a))
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.

This PR resolves issue #806
Now the second param of
dayjs().calendar(...)can be an object of callbacks, and the old behavior with a simples object of strings is working too!I added some tests too for test this new feature. Hope that helps!