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
formatDistance returns words instead of numbers in certain locales & formatDuration has the issue as well since it uses the locale function formatDuration.
for Example:
sv
constduration={years: 1,days: 25,months: 3};formatDuration(duration,{ format, zero, delimiter, locale });// => "ett år, tre månader, 25 dagar"
i believe the correct behavior is the second since the majority of the locales return numbers & not words.
The sv locale has a wordMapping array (word for numbers < 13) which does not exist in other locales, maybe a leftover from old API
The text was updated successfully, but these errors were encountered:
+1 on this issue. We support a multitude of languages and really enjoy having date-fns here, but right now we have to monkey patch sv and nn due to this behaviour.
The issue:
formatDistance
returns words instead of numbers in certain locales &formatDuration
has the issue as well since it uses the locale functionformatDuration
.for Example:
sv
en :
i believe the correct behavior is the second since the majority of the locales return numbers & not words.
The
sv
locale has a wordMapping array (word for numbers < 13) which does not exist in other locales, maybe a leftover from old APIThe text was updated successfully, but these errors were encountered: