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