简体   繁体   中英

Working with Jquery timeago plugin

I am working with Timeago plugin.

What can I do in order to us this kind of timestamp 2012-03-14 22:17:48?

Also

Javascript new Date() gives me Thu Mar 14 2012 23:24:51 GMT-0600 (MDT) which is my correct time.

I have the following for Timeage:

<abbr class="timeago" title="2012-03-14T22:17:48Z"></abbr>

Yet it is telling me it was posted "a day ago", which is actually about an hour and 7 minutes... What could be going wrong?

I used easy date it works great add script easydate-0.2.4.js then include

<abbr class="easydate">
   @Model.LastseenDate 
</abbr> 

If you use Livestamp.js , you can do something like this:

<abbr class="livestamp"></abbr>
<script>
    $('.livestamp').livestamp(new Date('2012-03-14 22:17:48'));
</script>

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM