mirror of
https://github.com/thelounge/thelounge
synced 2024-12-20 09:23:12 +00:00
1dc92d8934
¯\_(ツ)_/¯
13 lines
293 B
JavaScript
13 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",
|
|
});
|
|
};
|