UNPKG

date-fns

Version:

Modern JavaScript date utility library

12 lines (10 loc) 298 B
const formatRelativeLocale = { lastWeek: "'letzten' eeee 'um' p", yesterday: "'gestern um' p", today: "'heute um' p", tomorrow: "'morgen um' p", nextWeek: "eeee 'um' p", other: "P", }; export const formatRelative = (token, _date, _baseDate, _options) => formatRelativeLocale[token];