react-moment icon indicating copy to clipboard operation
react-moment copied to clipboard

FromNow/ToNow omitting ago

Open shaedrich opened this issue 7 years ago • 0 comments

Hi,

I found some strange behavior which results in wrong output when using FromNow/ToNow including ago to omit the ago suffix. If I don't omit the ago, it displays both "in x days" and "x days ago" when using ToNow. So why do we have both FromNow and ToNow if both doing the same but indicating they're just doing it in one direction? If I omit the prefix it only displays absolut numbers without saying if it is "in x days" or "x days ago" so it may be either one or the other - I simply don't know. To make sure to display that without using a prefix, the number must be positive when having "in x days" and negative when having "x days ago".

Hope you understand my problem Thanks in advance!

shaedrich avatar Jan 30 '18 09:01 shaedrich