Update week logic

This commit is contained in:
Jason Henriquez 2024-04-18 13:35:43 -05:00
parent 2a73b1dbbf
commit e83471a008
1 changed files with 1 additions and 1 deletions

View File

@ -762,7 +762,7 @@ export function getRelativeTimeFromDate(date, hideSeconds = false, useThirtyDayM
In other contexts, like when working with calculatePublishedDate, we use 30. */
const daysInMonth = useThirtyDayMonths ? 30 : 31
if (timeUnit === 'week' && timeDiffFromNowDays >= daysInMonth) {
timeDiffFromNow /= daysInMonth
timeDiffFromNow = timeDiffFromNowDays / daysInMonth
timeUnit = 'month'
}