Expose parts in sl-format-date
#2012
joeldrapper
started this conversation in
Ideas
Replies: 1 comment 2 replies
-
We use the Intl.DateTimeFormat API to output dates in various languages. As far as I know, there's no way to wrap chunks of its output. To do this, you'd probably need to parse the attributes (which were designed specifically for the Intl.DateTimeFormat API) and generate the wrapped dates/times independently. Of course, the order and presentation varies for each locale, so you'd have to add tons of logic that we currently get for free. Unless I'm missing a way to do this through Intl, I don't see it happening without a significant amount of code. |
Beta Was this translation helpful? Give feedback.
2 replies
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
-
It would be really useful to be able to select each part (day, month, year, etc.) of the format date element for styling. I’m happy to work on this as a PR if it’s something the maintainers are interested in.
Beta Was this translation helpful? Give feedback.
All reactions