-
-
Notifications
You must be signed in to change notification settings - Fork 337
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): "get date" can return formatted date #3141
Conversation
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.
Please see my comments / suggestions.
The new code is now somewhat duplicated four times (using a different metadata value) we should even think of putting that in a unique function
Ok. I am not fluent in JavaScript. I think more in term of C++, so I couldn't imagine parameters that were undefined. |
Done. You may suggest another function name... |
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, but cleaner! LGTM
Please take a short look at your docs PR where i was already commenting fomantic/Fomantic-UI-Docs#524
Docs added by fomantic/Fomantic-UI-Docs#524 |
Thank you for your reviews. |
Added types for the new optional format parameters for calendars get date functions as of #3141
could so far only return a Javascript Date object.
Now, given a
format
argument, they return a formatted date string:The
format
string is passed to the existing formatter.This is backward compatible as the default behaviour does not change.
It makes it convenient for developers to get exactly what they need when they need it.