jquery timeago NaN years ago with ISO date format

2019-09-19 17:08发布

问题:

I have some issues with jQuery timeago plugin http://timeago.yarp.com/

First of all, the short call version doesn't works, I don't know why. $("#abbr.timeago").timeago(); displays nothing. I must use $("abbr.timeago").text($.timeago($(this).prop("title"))); Weird...

(called in $(document).ready...)

Anyway, timeago allways displays me a 'NaN years ago'. Here are some generated html tag with differents formats

"yyyy-MM-dd'T'HH:mm:ss'Z'"
<abbr class="timeago" title="2013-04-17T11:32:08Z">NaN years ago</abbr>

...HH:mm:ssZ" displays
<abbr class="timeago" title="2013-04-17T11:32:08+0100">NaN years ago</abbr>

"...HH:mm:ssZ" displays
<abbr class="timeago" title="2013-04-17T11:32:08CEST">NaN years ago</abbr>

"...HH:mm:ss" displays
<abbr class="timeago" title="2013-04-17T11:32:08">NaN years ago</abbr>

Can anyone tell what format should I use ? and, is the <abbr> tag required ?

Jquery 1.10.2, timeago 1.1.0, chrome 26

Thanks !