date-fns
Version:
Modern JavaScript date utility library
32 lines (28 loc) • 693 B
JavaScript
Object.defineProperty(exports, "__esModule", {
value: true
});
exports.default = formatRelative;
var formatRelativeLocale = {
lastWeek: "'joan den' eeee, LT",
yesterday: "'atzo,' p",
today: "'gaur,' p",
tomorrow: "'bihar,' p",
nextWeek: 'eeee, p',
other: 'P'
};
var formatRelativeLocalePlural = {
lastWeek: "'joan den' eeee, p",
yesterday: "'atzo,' p",
today: "'gaur,' p",
tomorrow: "'bihar,' p",
nextWeek: 'eeee, p',
other: 'P'
};
function formatRelative(token, date, _baseDate, _options) {
if (date.getUTCHours() !== 1) {
return formatRelativeLocalePlural[token];
}
return formatRelativeLocale[token];
}
module.exports = exports.default;
;