Skip to content

Commit

Permalink
Fix calculation for adjusting start date to Sunday for booklog calendar.
Browse files Browse the repository at this point in the history
  • Loading branch information
krymtkts committed Jan 31, 2025
1 parent ecb94be commit 40e75c2
Showing 1 changed file with 2 additions and 2 deletions.
4 changes: 2 additions & 2 deletions src/Booklog.fs
Original file line number Diff line number Diff line change
Expand Up @@ -54,8 +54,8 @@ module Misc =
if d.DayOfWeek = DayOfWeek.Sunday then
d
else
let toMonday = (int d.DayOfWeek + 6) % 7 |> float
d.AddDays(-toMonday)
let toSunday = d.DayOfWeek |> float
d.AddDays(-toSunday)

let endDate =
let d = DateTime(year, 12, 31)
Expand Down

0 comments on commit 40e75c2

Please sign in to comment.