mirror of
https://github.com/thelittlerocket/rss-to-email.git
synced 2025-01-31 13:27:45 +08:00
23 hours should also show as 1 day
This commit is contained in:
parent
d3abf7decb
commit
70bfe1c2d3
1 changed files with 2 additions and 1 deletions
|
@ -6,7 +6,8 @@ export const parseIntro = (initialRun: boolean, itemCount: number, from: Dayjs)
|
|||
}
|
||||
|
||||
const hours = dayjs().diff(from, 'hours')
|
||||
const days = Math.floor(hours / 24)
|
||||
// Add 1 to the hours so 23 hours also becomes 1 day
|
||||
const days = Math.floor((hours + 1) / 24)
|
||||
|
||||
if (days === 1) {
|
||||
return `${itemCount} updates since yesterday`
|
||||
|
|
Loading…
Reference in a new issue