|
@@ -1,6 +1,7 @@
|
|
|
$(function() {
|
|
|
moment.lang($('html').attr('lang'))
|
|
|
var moment_now = moment();
|
|
|
+ var time_format = moment_now.lang()._longDateFormat.LT;
|
|
|
|
|
|
var moments = {};
|
|
|
|
|
@@ -24,8 +25,10 @@ $(function() {
|
|
|
if (moments[timestamp] != undefined) {
|
|
|
if (moment_now.diff(moments[timestamp].rel_moment, 'hours') <= 6) {
|
|
|
$(this).text(moments[timestamp].rel_moment.fromNow());
|
|
|
- } else if (moment_now.diff(moments[timestamp].rel_moment, 'days') <= 7) {
|
|
|
+ } else if (moment_now.diff(moments[timestamp].rel_moment, 'days') < 2) {
|
|
|
$(this).text(moments[timestamp].rel_moment.calendar());
|
|
|
+ } else if (moment_now.diff(moments[timestamp].rel_moment, 'days') <= 7) {
|
|
|
+ $(this).text(moments[timestamp].rel_moment.format("dddd, " + time_format));
|
|
|
} else {
|
|
|
$(this).text(moments[timestamp].original);
|
|
|
}
|