UNPKG

date-fns

Version:

Modern JavaScript date utility library

12 lines (10 loc) 294 B
const formatRelativeLocale = { lastWeek: "eeee 'diwethaf am' p", yesterday: "'ddoe am' p", today: "'heddiw am' p", tomorrow: "'yfory am' p", nextWeek: "eeee 'am' p", other: "P", }; export const formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];