date-fns
Version:
Modern JavaScript date utility library
12 lines (10 loc) • 312 B
JavaScript
const formatRelativeLocale = {
lastWeek: "'viime' eeee 'klo' p",
yesterday: "'eilen klo' p",
today: "'tänään klo' p",
tomorrow: "'huomenna klo' p",
nextWeek: "'ensi' eeee 'klo' p",
other: "P",
};
export const formatRelative = (token, _date, _baseDate, _options) =>
formatRelativeLocale[token];