2017-04-19 06:33:05 +00:00
|
|
|
"use strict";
|
|
|
|
|
|
|
|
const moment = require("moment");
|
|
|
|
|
|
|
|
module.exports = function(time) {
|
|
|
|
// See http://momentjs.com/docs/#/displaying/calendar-time/
|
2017-04-29 10:31:04 +00:00
|
|
|
return moment(time).calendar(null, {
|
2017-04-19 06:33:05 +00:00
|
|
|
sameDay: "[Today]",
|
|
|
|
lastDay: "[Yesterday]",
|
2017-04-29 10:31:04 +00:00
|
|
|
lastWeek: "D MMMM YYYY",
|
2017-11-15 06:35:15 +00:00
|
|
|
sameElse: "D MMMM YYYY",
|
2017-04-19 06:33:05 +00:00
|
|
|
});
|
|
|
|
};
|