From 4cc6a6a12c45217fc834c7d558cda1023e338b73 Mon Sep 17 00:00:00 2001 From: Lim Chee Aun Date: Sun, 22 Sep 2024 13:54:43 +0800 Subject: [PATCH] Forgot to commit this --- src/utils/nice-date-time.js | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/utils/nice-date-time.js b/src/utils/nice-date-time.js index 53b5138c..65e37cfc 100644 --- a/src/utils/nice-date-time.js +++ b/src/utils/nice-date-time.js @@ -8,11 +8,11 @@ const defaultLocale = mem( ); const _DateTimeFormat = (opts) => { - const { locale, dateYear, hideTime, formatOpts } = opts || {}; + const { locale, dateYear, hideTime, formatOpts, forceOpts } = opts || {}; const regionlessLocale = locale.replace(/-[a-z]+$/i, ''); const loc = localeMatch([regionlessLocale], [defaultLocale], locale); const currentYear = new Date().getFullYear(); - const options = { + const options = forceOpts || { // Show year if not current year year: dateYear === currentYear ? undefined : 'numeric', month: 'short',