# HG changeset patch # User Mike Becker # Date 1738415506 -3600 # Node ID d869ff924c194494dabfe6c2e7d10d25b7da6ea1 # Parent 127fb6a8f7062ee3b5ddc1157d4d7a20e24a5c82 use chrono API to determine the first monday in the year instead of calculating it diff -r 127fb6a8f706 -r d869ff924c19 src/main.cpp --- a/src/main.cpp Sat Feb 01 14:04:19 2025 +0100 +++ b/src/main.cpp Sat Feb 01 14:11:46 2025 +0100 @@ -228,8 +228,7 @@ unsigned column = 0, row = 0; // initialize first day (which must be a Monday, possibly the year before) - chrono::sys_days day_to_check{report_begin}; - day_to_check -= chrono::days{chrono::weekday{day_to_check}.iso_encoding() - 1}; + chrono::sys_days day_to_check = chrono::January / chrono::Monday[1] / chrono::year{year}; // remember the starting point auto start = day_to_check;