diff options
Diffstat (limited to 'date-fns/src/locale/es/_lib/formatRelative/index.js')
-rw-r--r-- | date-fns/src/locale/es/_lib/formatRelative/index.js | 24 |
1 files changed, 24 insertions, 0 deletions
diff --git a/date-fns/src/locale/es/_lib/formatRelative/index.js b/date-fns/src/locale/es/_lib/formatRelative/index.js new file mode 100644 index 0000000..6323dc1 --- /dev/null +++ b/date-fns/src/locale/es/_lib/formatRelative/index.js @@ -0,0 +1,24 @@ +var formatRelativeLocale = { + lastWeek: "'el' eeee 'pasado a la' LT", + yesterday: "'ayer a la' p", + today: "'hoy a la' p", + tomorrow: "'mañana a la' p", + nextWeek: "eeee 'a la' p", + other: 'P' +} + +var formatRelativeLocalePlural = { + lastWeek: "'el' eeee 'pasado a las' p", + yesterday: "'ayer a las' p", + today: "'hoy a las' p", + tomorrow: "'mañana a las' p", + nextWeek: "eeee 'a las' p", + other: 'P' +} + +export default function formatRelative(token, date, _baseDate, _options) { + if (date.getUTCHours() !== 1) { + return formatRelativeLocalePlural[token] + } + return formatRelativeLocale[token] +} |