|
From: <no...@tc...> - 2025-11-07 15:18:16
|
Automated mail by fx, on behalf of no...@tc... Ticket Change [be02abbda58ad95c6b5e369a6b3a25fe5bf3a4db95bb3ffc88de101061b95656] [[clock scan] bug in widget::calendar (Tcl 9)] By emiliano For Tklib On 2025-11-07T15:15:17.059 Details https://core.tcl-lang.org/tklib/tinfo?name=be02abbda58ad95c6b5e369a6b3a25fe5bf3a4db95bb3ffc88de101061b95656 Ticket https://core.tcl-lang.org/tklib/tktview/c800a75eb5cecd208e2e48bbe46226aec4a70c04 Changed Fields closedate: 2025-11-07 15:15:17 closer: emiliano icomment: Attached a second patch (to be applied over the first one) which I hope makes things clearer. The code calls the numberofdays method with a range of months from 0 (meaning december last year) to 13 (january next year). There's no need to go round trip to [clock scan]/[clock format] just to determine the number of days in month for the pair month/year, as this can be determined by a simple lookup table. As an additional benefit, the code should be way faster on 8.X (not that it matters in this use case). Manually tested with both 8.6 and 9.1 login: emiliano ------------------------------------------------------------ See Tcl/Tk development @ http://core.tcl-lang.org/ ------------------------------------------------------------ |