面对问题与moment.js:

时间:2016-11-12 12:13:07

标签: javascript angularjs momentjs

当我发帖时,时间从5s,4s,3s,2s,1s开始,然后它显示2s,3s,4s,5s,6s ......... 它应该从1s,2s,3s开始.....继续

moment.lang('en', {
    relativeTime : {
        future: "in %s",
        past:   "%s",
        s:  "%ds",
        m:  "1m",
        mm: "%dm",
        h:  "1h",
        hh: "%dh",
        d:  "1d",
        dd: "%dd",
        M:  "30d",
        MM: function (number) {
          return number * 30 + 'd';
        },
        y:  "365d",
        yy: function (number) {
          return number * 365 + 'd';
        }
    }
});

0 个答案:

没有答案