Skip to content
Tcl Source Code Ticket Change Details
Login

Ticket Change Details

Overview

Artifact ID: 12ee0beb0528893244ac5b021776363f4aa29226
Ticket: 2010909fffffffffffffffffffffffffffffffff
clock scan fails with %V
User & Date: kennykb on 2008-07-05 05:02:41
Changes

  1. closedate changed to: "2008-07-04T22:02:41"
  2. closer changed to: "kennykb"
  3. 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.
    
    
    
    
  4. login: "kennykb"
  5. mimetype: "text/plain"
  6. resolution changed to: "Invalid"
  7. status changed to: "Pending"
  8. username: "kennykb"