( token, date, baseDate, options, )
| 65 | }; |
| 66 | |
| 67 | export const formatRelative: FormatRelativeFn = ( |
| 68 | token, |
| 69 | date, |
| 70 | baseDate, |
| 71 | options, |
| 72 | ) => { |
| 73 | const format = formatRelativeLocale[token]; |
| 74 | |
| 75 | if (typeof format === "function") { |
| 76 | return format(date, baseDate, options); |
| 77 | } |
| 78 | |
| 79 | return format; |
| 80 | }; |