Closed ValentinTrinque closed 8 years ago
we could have
2016-08-25T00:00:00+02:00
givingtoday
Unlikely to ever be a core feature. It violates the notion of a fuzzy timestamp. This has been covered a few times in previously (closed) issues.
(Well, I concede this API is horrible and we have to discuss about it...)
Agreed, and there is no need to add any features. You can already accomplish what you want by simply overriding some of the locale methods. Examples:
jQuery.timeago.settings.strings.seconds = "less than a day";
jQuery.timeago.settings.strings.minute = "less than a day";
jQuery.timeago.settings.strings.minutes = "less than a day";
jQuery.timeago.settings.strings.hour = "less than a day";
jQuery.timeago.settings.strings.hours = "less than a day";
Ok I get your point. That would be very nice to have it in the documentation, since it has been ask many time already, what do you think ?
That would be very nice to have it in the documentation, since it has been ask many time already, what do you think ?
Sorry, no. I'm not going to add and support and maintain documentation for features that are not part of the library. That would be endless. Not to mention, people usually fail to read the documentation or search past issues before requesting new features anyway.
However, the Wiki is open for people to add whatever documentation they think is appropriate to help future onlookers.
I was talking about the solution you gave to me, to know :
jQuery.timeago.settings.strings.seconds = "less than a day";
jQuery.timeago.settings.strings.minute = "less than a day";
jQuery.timeago.settings.strings.minutes = "less than a day";
jQuery.timeago.settings.strings.hour = "less than a day";
jQuery.timeago.settings.strings.hours = "less than a day";
This is what I was talking about.
I am dealing with a project where I need to display the records creation date with a "timeago" format. The things is, the time is always set to
00:00:00
. Only the date matters.The problem is we can't specify the element form which timeago should format.
It would be nice to have something like :
So, if we are the 25/08 at 9am, we could have
2016-08-25T00:00:00+02:00
givingtoday
. Instead of9 hours ago
.(Well, I concede this API is horrible and we have to discuss about it...)
I guess we will have to focus on that.
What do you think ?