Monorepo for Tangled
0

Configure Feed

Select the types of activity you want to include in your feed.

appview/db: fix off-by-1 in punchcard

Date.YearDay produces an int in the range 1-365/366 but slices are
indexed from 0.

Signed-off-by: oppiliappan <me@oppi.li>

author
oppiliappan
date (Jan 5, 2026, 3:20 AM UTC) commit 252ac005 parent 027459fe change-id ntvxrwvl
+1 -1
+1 -1
appview/db/punchcard.go
··· 78 78 punch.Count = int(count.Int64) 79 79 } 80 80 81 - punchcard.Punches[punch.Date.YearDay()] = punch 81 + punchcard.Punches[punch.Date.YearDay()-1] = punch 82 82 punchcard.Total += punch.Count 83 83 } 84 84