You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I am currently building a internationalized application using date-fns. I've recently migrated from momentjs and I'm struggling with one question:
Is it possible to retrieve the expanded localized format for a given locale?
For example, given the French locale and 'P', is it possible to have 'dd/MM/y' as output of any import/function/whatever?
Getting the real format can be useful for some custom HTML output. Right now, there is no possibility to format a date like <span class="hours">18</span>:<span class="minutes">37</span>:<span class="seconds">43</span> using localization. But I maybe wrong also on this one…
reacted with thumbs up emoji reacted with thumbs down emoji reacted with laugh emoji reacted with hooray emoji reacted with confused emoji reacted with heart emoji reacted with rocket emoji reacted with eyes emoji
-
I am currently building a internationalized application using date-fns. I've recently migrated from momentjs and I'm struggling with one question:
Is it possible to retrieve the expanded localized format for a given locale?
For example, given the French locale and 'P', is it possible to have 'dd/MM/y' as output of any import/function/whatever?
Getting the real format can be useful for some custom HTML output. Right now, there is no possibility to format a date like
<span class="hours">18</span>:<span class="minutes">37</span>:<span class="seconds">43</span>
using localization. But I maybe wrong also on this one…Any help and/or positive criticism is welcomed!
Beta Was this translation helpful? Give feedback.
All reactions