Forum OpenACS Development: Re: Compare Dates

4: Re: Compare Dates (response to 1)
Posted by Tilmann Singer on
It appears that template::util::date::compare does what you want. If you need to perform other operations on dates I suggest retrieving the tcl clock value from the widget date with

set date_inicio_clock [util::date::get_property clock date_inicio]

And use that value for your operations - it's simply an integer with the unix seconds - see 'man 3tcl clock' to see how you can manipulate it.

To set the value of an OpenACS date widget to a previously calculated clock value use this:

util::date::set_property clock date_inicio $date_inicio_clock