repos / pico

pico services - prose.sh, pastes.sh, imgs.sh, feeds.sh, pgs.sh
git clone https://github.com/picosh/pico.git

commit
7ebe845
parent
f685533
author
Eric Bower
date
2024-09-23 17:39:43 +0000 UTC
fix(feeds): days until expiration date
1 files changed,  +1, -1
M feeds/cron.go
+1, -1
1@@ -334,7 +334,7 @@ func (f *Fetcher) FetchAll(logger *slog.Logger, urls []string, inlineContent boo
2 	fp := gofeed.NewParser()
3 	daysLeft := "90"
4 	if post.ExpiresAt != nil {
5-		diff := time.Since(*post.ExpiresAt)
6+		diff := time.Until(*post.ExpiresAt)
7 		daysLeft = fmt.Sprintf("%f", math.Ceil(diff.Hours()/24))
8 	}
9 	feeds := &DigestFeed{