UNPKG

date-fns

Version:

Modern JavaScript date utility library

23 lines (22 loc) 558 B
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' }; export default function formatRelative(token, date, _baseDate, _options) { if (date.getUTCHours() !== 1) { return formatRelativeLocalePlural[token]; } return formatRelativeLocale[token]; }