Hi
Why don't get an error:
clock format [clock scan 2023-22-35 -format %Y-%m-%d] -format "%Y-%m-%d"
2023-22-35 isn't a guilty date.
I get: 2024-11-04
The Tcl 8.6 (you didn't say which Tcl, but this behaviour came about in
8.6) effectively performs a "modulo" on the month and on the day to
produce a "what you must have meant" result instead of reporting an
"invaid date" error.
22 modulo 12 is 10.
35 modulo 31 (month 10 has 31 days) is 4
Personally I'd have preferred an "invalid date" error.
Sysop: | Keyop |
---|---|
Location: | Huddersfield, West Yorkshire, UK |
Users: | 496 |
Nodes: | 16 (4 / 12) |
Uptime: | 53:50:51 |
Calls: | 9,759 |
Calls today: | 19 |
Files: | 13,742 |
Messages: | 6,185,022 |