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.25 -r1.26 --- openacs-4/packages/acs-templating/tcl/date-procs.tcl 18 Dec 2003 12:24:35 -0000 1.25 +++ openacs-4/packages/acs-templating/tcl/date-procs.tcl 18 Dec 2003 14:18:59 -0000 1.26 @@ -374,10 +374,16 @@ ad_proc -public template::util::date::set_property { what date value } { mutate properties of the Date object } { + # Erase leading zeroes from the value, but make sure that 00 - # is not completely erased - set value [template::util::leadingTrim $value] + # 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 [template::util::leadingTrim $value] + } + } + switch $what { year { return [lreplace $date 0 0 $value] } month { return [lreplace $date 1 1 $value] }