This project is archived and is in readonly mode.

#125 ✓wontfix

Misleading results from timeDiffInWords

Reported by henrikb4 | September 23rd, 2009 @ 08:06 PM

The timeDiffInWords function from Date.Extra is returning misleading results because of the current "template" of how the localization strings are worded.

When diffing two dates it's possible to make it return a result like "1 day from now", even if the diff was not on the current date against another.

And example can be seen on Mooshell:

I don't have any idea to how the wording should be, but something along "1 day since" and "1 day after" might be more flexible.
Another solution would be to ignore it.

Comments and changes to this ticket

  • Scott Kyle

    Scott Kyle September 25th, 2009 @ 08:29 PM

    • State changed from “new” to “wontfix”
    • Assigned user set to “Scott Kyle”

    Hi, while your point is perfectly valid, the relative_to argument in timeDiffinWords is merely a convenience rather than a primary use of the method. One such convenience would be to adjust the Date to another time zone, for example. So I don't think it's wise to add a whole other array of copy into the localizations to support "1 day since", et al. Thanks for the feedback.

Create your profile

Help contribute to this project by taking a few moments to create your personal profile. Create your profile »

The MooTools Extensions

People watching this ticket