LocalizedTimeAgo icon indicating copy to clipboard operation
LocalizedTimeAgo copied to clipboard

Optimize date component calculation

Open ejensen opened this issue 3 years ago • 0 comments

Before this change, the date components were being calculated on each if / else if condition. This change removes the redundant calculation by making a local copy of the components before the if / else if conditions are reached.

This change also adds the option to specify the reference date, rather than limiting the reference date to now.

ejensen avatar Feb 27 '22 16:02 ejensen