mirror of
https://github.com/fmtlib/fmt.git
synced 2026-10-29 02:17:28 +08:00
iso_year_weeks computed the weekday of December 31 with truncating division and a remainder that is negative for negative years, so it returned the wrong number of ISO weeks for years before year 0. As a result %V and %G/%g were wrong around the start and end of such years, e.g. 1 January of year -1 was formatted as week 52 of year -2 instead of week 53, and 31 December of year -2 as week 1 of year -1. Use floored division and a non-negative remainder. Claude-Session: https://claude.ai/code/session_01Y1b55sEL1gA1c3FCMcQCbm Co-authored-by: Claude Opus 5.5 (1M context) <noreply@anthropic.com> |
||
|---|---|---|
| .. | ||
| fmt | ||