set EASTERN :America/New_York set s [clock scan now -timezone $EASTERN ] set yesterday [clock add $s -1 day -timezone $EASTERN] set x [clock format $yesterday -timezone $EASTERN] puts $xOf course, you don't have to do things as separate calls - you can do it as all one call.
set nextweek [clock add $s 1 week -timezone $EASTERN] set x [clock format $nextweek -timezone $EASTERN]clock add should provide most, if not more, capability of the old freeform clock scan, with the downside of using a slightly different notation.
EMJ:I'm sure I could code anything I need, but I was actually talking about end-users, who would rather type in "yesterday" or "last week" or "13 jan" or "jan 13" than select from a popup calendar - at the moment I just pass their input to clock scan, what would I have to do if it wasn't there?slebetman: Agreed. Configuration files for most of my apps allows users to enter things this way when specifying time or time interval. Having to handle this myself means that I have to write a proc that handles possibly hundreds of cases for:
1hour 1 hour 5 hours 20 seconds tomorrow yesterday next week nextmonth lastweek lastyear yesterday-1hour -4years ...It's nice that clock scan already does this for me.