hardlounge/client/js/libs/handlebars/friendlydate.js
Jérémie Astori 1dc92d8934
Enforce dangling commas with ESLint
¯\_(ツ)_/¯
2017-11-15 01:35:15 -05:00

14 lines
293 B
JavaScript

"use strict";
const moment = require("moment");
module.exports = function(time) {
// See http://momentjs.com/docs/#/displaying/calendar-time/
return moment(time).calendar(null, {
sameDay: "[Today]",
lastDay: "[Yesterday]",
lastWeek: "D MMMM YYYY",
sameElse: "D MMMM YYYY",
});
};