diff --git a/Plan/react/dashboard/src/components/text/FormattedDate.jsx b/Plan/react/dashboard/src/components/text/FormattedDate.jsx index ae09a078b..8c7d5b540 100644 --- a/Plan/react/dashboard/src/components/text/FormattedDate.jsx +++ b/Plan/react/dashboard/src/components/text/FormattedDate.jsx @@ -28,11 +28,11 @@ export function formatDate(date, offset, pattern, recentDays, recentDaysPattern, let format = pattern; if (recentDays) { - if (timestamp > now - fromStartOfToday) { + if (timestamp > now - offset - fromStartOfToday) { format = format.replace(recentDaysPattern, t('plugin.generic.today')); - } else if (timestamp > now - dayMs - fromStartOfToday) { + } else if (timestamp > now - offset - dayMs - fromStartOfToday) { format = format.replace(recentDaysPattern, t('plugin.generic.yesterday')); - } else if (timestamp > now - dayMs * 5) { + } else if (timestamp > now - offset - dayMs * 5) { format = format.replace(recentDaysPattern, "EEEE"); } }