Artifacts Associated With Ticket 1505383fffffffffffffffffffffffffffffffff
Ticket change [b443a31d0f] (rid 124997) by tallniel on 2006-06-13 12:55:14:
- assignee initialized to: "dkf"
- cmimetype initialized to: "text/plain"
- comment initialized to:
clock format %W option is broken in current CVS: % info pa 8.5a5 % clock format [clock seconds] -format %W can't read "Wweeknumber": no such variable % set errorInfo can't read "Wweeknumber": no such variable while executing "::format %02d $Wweeknumber" (procedure "::tcl::clock::formatproc'%W'C" line 11) invoked from within "$formatter $clockval $timezone" (procedure "::tcl::clock::format" line 74) invoked from within "::tcl::clock::format 1150202323 -format %W" ("uplevel" body line 1) invoked from within "uplevel 1 [info level 0]" (procedure "::tcl::clock::format" line 4) invoked from within "clock format [clock seconds] -format %W" % info body tcl::clock::formatproc'%W'C variable TZData set date [GetDateFields $clockval $TZData($timezone) 2299161] set WweekNumber [expr { ( [dict get $date dayOfYear] - [dict get $date dayOfWeek] + 7 ) / 7 }] return [::format %02d $Wweeknumber] The problem is this last reference to $Wweeknumber in the format: the 'n' should be capitalised. As this is generated code, the actual bug is in library/clock.tcl line 4625, proc tcl::clock::ParseClockFormatFormat2. I attach a patch that fixes this. - foundin initialized to: "obsolete: 8.5a5"
- priority initialized to: "5 Medium"
- resolution initialized to: "None"
- status initialized to: "Open"
- submitter initialized to: "tallniel"
- subsystem initialized to: "16. Commands A-H"
- title initialized to: "clock format %W broken"
- type initialized to: "Bug"
Ticket change [5b6f77fe64] (rid 118324) by tallniel on 2006-06-13 19:55:15:
- icomment:
File Added - 181506: clockformatW.patch
- login: "tallniel"
- mimetype: "text/plain"
- username: "tallniel"
- icomment:
Add attachment "clockformatW.patch" [c6e332737f] (rid 121848) by tallniel on 2006-06-13 19:55:15.
Ticket change [b130d04c90] (rid 98112) by tallniel on 2006-06-13 19:56:06:
- assignee changed to: "kennykb"
Ticket change [d461949433] (rid 123433) by dkf on 2006-06-13 20:23:29:
- subsystem changed to: "06. Time Measurement"
Ticket change [fcc14ad28e] (rid 108294) by mistachkin on 2006-06-14 00:41:08:
- icomment:
Logged In: YES user_id=113501 I think some of the other format specifiers are also broken (at least %Ey and %EY): clock format [clock seconds] -format %Ey % can't use empty string as operand of "-" while executing "expr { [dict get $date year] - [lindex $etable $index 2] }" (procedure "GetLocaleEra" line 9) invoked from within "GetLocaleEra $date[set date {}] {}" (procedure "::tcl::clock::formatproc'%Ey'C" line 6) invoked from within "$formatter $clockval $timezone" (procedure "::tcl::clock::format" line 74) invoked from within "clock format [clock seconds] -format %Ey" - login: "mistachkin"
- mimetype: "text/plain"
- username: "mistachkin"
- icomment:
Ticket change [fb6b5728fe] (rid 92065) by kennykb on 2006-07-31 02:01:45:
- closedate changed to: "2006-07-30T19:01:45"
- closer changed to: "kennykb"
- icomment:
Logged In: YES user_id=99768 Joe Mistachkin's comments are a separate bug, which would get tickled in some combinations of %E without %O. Neil's analysis of the %W bug is fixed. (Neil, why on Earth were you using %W, anyway? The ISO week number is %V - %W is for compatibility with some legacy software but is not correct for any known calendar.) Both bugs are now fixed.
- login: "kennykb"
- mimetype: "text/plain"
- resolution changed to: "Fixed"
- status changed to: "Closed"
- username: "kennykb"