Index: openacs-4/packages/acs-templating/tcl/date-procs.tcl =================================================================== RCS file: /usr/local/cvsroot/openacs-4/packages/acs-templating/tcl/date-procs.tcl,v diff -u -r1.63.2.12 -r1.63.2.13 --- openacs-4/packages/acs-templating/tcl/date-procs.tcl 18 Aug 2021 14:19:51 -0000 1.63.2.12 +++ openacs-4/packages/acs-templating/tcl/date-procs.tcl 18 Aug 2021 14:44:27 -0000 1.63.2.13 @@ -475,15 +475,21 @@ return $date } - # Erase leading zeros from the value, but make sure that 00 - # is not completely erased - but only for single-element properties + # This trimming is actually more of a noop, as one should actually + # switch on the 'what' variable, expected to match one of the + # keys, while 'value' will just be a date. The probable typo is 18 + # years old, so I am commenting out the code, rather than "fixing + # it", with possible unexpected consequences. Might go away for + # good at some point. + # # Erase leading zeros from the value, but make sure that 00 + # # is not completely erased - but only for single-element properties + # + # switch -- $value { + # year - month - day - hour - minutes - seconds - short_year - short_hours - ampm { + # set value [util::trim_leading_zeros $value] + # } + # } - switch -- $value { - year - month - day - hour - minutes - seconds - short_year - short_hours - ampm { - set value [util::trim_leading_zeros $value] - } - } - switch -- $what { year { return [lreplace $date 0 0 $value] } month { return [lreplace $date 1 1 $value] }