-
-
Notifications
You must be signed in to change notification settings - Fork 331
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
feat(calendar): support token dateformats #2324
Merged
Merged
Conversation
This file contains 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
lubber-de
added
type/feat
Any feature requests or improvements
lang/javascript
Anything involving JavaScript
state/awaiting-reviews
Pull requests which are waiting for reviews
state/awaiting-docs
Pull requests which need doc changes/additions
tag/breaking-change
Any pull request which is waiting for a breaking change release
labels
Apr 15, 2022
This was referenced Apr 15, 2022
Closed
lubber-de
changed the title
feat(calender): support token dateformats
feat(calendar): support token dateformats
Apr 15, 2022
exoego
previously approved these changes
Apr 15, 2022
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.
This is awesome 👍
lubber-de
removed
the
state/awaiting-reviews
Pull requests which are waiting for reviews
label
Apr 17, 2022
Docs added by fomantic/Fomantic-UI-Docs#348 |
lubber-de
added
state/has-docs
A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo
and removed
state/awaiting-docs
Pull requests which need doc changes/additions
labels
May 28, 2022
lubber-de
added a commit
to fomantic/Fomantic-UI-Docs
that referenced
this pull request
Jun 4, 2022
Added new token format example and adjusted related other examples like 24h format as of fomantic/Fomantic-UI#2324
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Labels
lang/javascript
Anything involving JavaScript
state/has-docs
A issue/PR which requires documentation changes and has the corresponding PR open in the docs repo
tag/breaking-change
Any pull request which is waiting for a breaking change release
type/feat
Any feature requests or improvements
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.
Description
This PR adds support to use token strings as a date formatter. It's still possible to provide functions as before.
The base idea is adopted from https://blog.stevenlevithan.com/archives/javascript-date-format
Now you can use something like
Usable Tokens (i compared popular big date libs like momentjs, date-fns, luxon and dayjs to make sure to basically match the same syntax)
I removed the
ampm
setting, because it is now controllable via theA
ora
token.Testcase
https://jsfiddle.net/lubber/e476qpnm/6/
Closes
#508
#568
#1523
#1645
#1218
#2268