我正在尝试timeago
结合datejs (with help of this to get format for local time)
因为timeago
我使用以下内容:
jQuery(document).ready(function() {
jQuery("abbr.timeago").timeago();
});
对于localtime
我使用这个:
jQuery(document).ready(function() {
$('.UTCTimestamp').localTimeFromUTC('MM/dd/yyyy hh:mm:ss');
});
我如何将这两者结合在一起?现在我只能像这样使用一个:
对于时间:
<span class='UTCTimestamp'>2011-09-09 10:10:10</span>
和本地时间;
<abbr class='timeago' title='2011-09-09 10:10:10'>2011-09-09 10:10:10</abbr>