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
are treated the same -- that is to say, dates (without times) are treated as exactly midnight (12:00:00) of that day, which leads to some undesirable cases when you really only care about date-level-precision for those dates.
For example, I want 2014-03-13 to say "today" and 2014-03-12 to say "yesterday". But what actually happens is 2014-03-12 says something like "14 hours ago".
My proposal is that if the T (time portion) of the date is present, the library works exactly as-is. However if the T (time) of the date is not present, it would work on date-only precision.
I would not want a global setting to change the precision, because I often want to mix between datetimes and dates on the same page.
The text was updated successfully, but these errors were encountered:
Interesting. Others have asked for "today" and "yesterday" precision, but I've always rejected the request, because the hour of the day was always in consideration and time zones affect "today" and "yesterday."
@philfreo This would actually be a great addition because:
Sometimes dates are being output without times.
Timeago works on such dates, but obviously with limited information.
If I this instant create a blog post that currently only reports it's date, using: <time class='timeago' datetime='2015-12-31'>2015-12-31</time> it's going to display as: 11 hours ago even the second after I make the post, even though a normal observer would understand that in normal parlance a date of 2015-12-31 can be applied vaguely to mean "sometime on this date" as opposed to exactly midnight.
I think this would be a great addition for the special case of non-time-attached dates within the last 24 hours.
Right now datetimes:
<abbr class="timeago" title="2014-03-12T09:24:17Z">March 12, 2014</abbr>
and dates (without times):
<abbr class="timeago" title="2014-03-12">March 12, 2014</abbr>
are treated the same -- that is to say, dates (without times) are treated as exactly midnight (12:00:00) of that day, which leads to some undesirable cases when you really only care about date-level-precision for those dates.
For example, I want 2014-03-13 to say "today" and 2014-03-12 to say "yesterday". But what actually happens is 2014-03-12 says something like "14 hours ago".
My proposal is that if the
T
(time portion) of the date is present, the library works exactly as-is. However if theT
(time) of the date is not present, it would work on date-only precision.I would not want a global setting to change the precision, because I often want to mix between datetimes and dates on the same page.
The text was updated successfully, but these errors were encountered: