Overview
| Artifact ID: | 12ee0beb0528893244ac5b021776363f4aa29226 |
|---|---|
| Ticket: | 2010909fffffffffffffffffffffffffffffffff
clock scan fails with %V |
| User & Date: | kennykb on 2008-07-05 05:02:41 |
Changes
- closedate changed to: "2008-07-04T22:02:41"
- closer changed to: "kennykb"
- icomment:
Logged In: YES user_id=99768 Originator: NO A careful reading of clock.n (under SCANNING TIMES) shows that [clock] here works as designed and documented. I concede that the behaviour of ignoring the 'week' format group in that case is puzzling, but it fits with the fact that redundant groups are (and must be) ignored in other cases - for instance, in parsing an RFC2822 date, the day-of-the-week is presented even though the other fields are sufficient to specify the date. It is easy to parse a date like 2008-W27 if you need the start of the week: set date {2008-W27} set secs [clock scan "$date-1" -format "%G-%V-%u"] Another reason for the code to work the way it does is that otherwise there is also a possibility of nonsense combinations like "%G-%u" without a week number - either choosing a given weekday in the first week, or a given weekday in the current week number, would be surprising. - login: "kennykb"
- mimetype: "text/plain"
- resolution changed to: "Invalid"
- status changed to: "Pending"
- username: "kennykb"