today is eg 12/19/2002 then the following line
Code: Select all
clock format [clock seconds] -format "%b %d"
so far so good....
But how must the line looks like to get the date from tormorrow (Dec 20) and the day after (Dec 21)?
Thanks
jagg
Code: Select all
clock format [clock seconds] -format "%b %d"
Well if [clock seconds] is today, and knowing that [clock seconds] returns the time in unix format (that being the number of seconds since a certain date), then logically it would follow you would want [clock seconds] + (24 * 60 * 60) [where 24 is hours in a day, 60 is minutes in an hour, and 2nd 60 is the seconds in a minute -> which gives the number of seconds in a day]..jagg wrote:Hi,
today is eg 12/19/2002 then the following linewill post Dec 19Code: Select all
clock format [clock seconds] -format "%b %d"
so far so good....
But how must the line looks like to get the date from tormorrow (Dec 20) and the day after (Dec 21)?
Thanks
jagg
Code: Select all
proc pub:test {nick host hand chan arg} {
set tomorrow [clock scan "tomorrow"]
set dayaftertomorrow [expr $tomorrow + (24 * 60 * 60)]
putserv "PRIVMSG $chan : Tomorrow: [clock format $tomorrow -format "%b %d"] "
putserv "PRIVMSG $chan : The day after: [clock format $dayaftertomorrow -format "%b %d"] "
}