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
Currently, it's possible to use this library and ignore large units by using the threshold configuration [1]. It should also be possible to ignore small units potentially by using a baseline (any better word?) configuration [2].
1:
constrelativeTime=newRelativeTime();relativeTime.format(aTwoYearsAgoDate));// > '2 years ago'RelativeTime.threshold.month=Infinity;relativeTime.format(aTwoYearsAgoDate);// > '24 months ago'
Currently, it's possible to use this library and ignore large units by using the threshold configuration [1]. It should also be possible to ignore small units potentially by using a baseline (any better word?) configuration [2].
1:
2:
That could be accomplish with the following change:
Side-note: It's a good approach to enable "week", because it's possible to keep the existing behavior by configuring threshold and baseline.
The text was updated successfully, but these errors were encountered: