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.23.2.1 -r1.23.2.2 --- openacs-4/packages/acs-templating/tcl/date-procs.tcl 24 Nov 2003 13:04:19 -0000 1.23.2.1 +++ openacs-4/packages/acs-templating/tcl/date-procs.tcl 24 Dec 2003 02:13:19 -0000 1.23.2.2 @@ -169,9 +169,31 @@ } ad_proc -public template::util::date::get_property { what date } { - Access properties of the Date object - Is it better to name them symbolically, as opposed to - using the format string codes ? + + Returns a property of a date list, usually created by ad_form. + + @param what the name of the property. one of: + @param date the date widget list } { variable month_data @@ -332,6 +354,9 @@ } return [clock scan $value] } + default { + error "util::date::get_property: unknown property: '$what'." + } } } @@ -349,7 +374,15 @@ } ad_proc -public template::util::date::set_property { what date value } { - mutate properties of the Date object + + Replace a property in a list created by a date widget. + + @param what name of the property (see source for allowed values) + @param date the date list + @param value the new value + + @return the modified list + } { # Erase leading zeroes from the value, but make sure that 00 # is not completely erased @@ -428,6 +461,9 @@ now { return [template::util::date set_property clock $date [clock seconds]] } + default { + error "util::date::set_property: unknown property: '$what'." + } } }