#datevalue()
DESCRIPTION
returns the date value for the given date (dd/mm/yyyy)
SYNOPSIS
#datevalue(i1,i2,i3)
ARGUMENTS
i1 - year (4 digits), or an integer expression resolving to a year
i2 - month (1-12), or an integer expression resolving to a month
i3 - day (1-31), or an integer expression resolving to a day
EXAMPLES
# pikt +C 'output $text(#datevalue(2007,6,21))'
1182405600
rule
set #msgage = #daysbetween(#datevalue(#yr, #mn, #date), #timenow)
remind(Y, M, D, MSG)
// send out a reminder message beginning at a certain date
// (Y) is the year (e.g., 2007)
// (M) is the month (e.g., 7)
// (D) is the date (e.g., 15)
// (MSG) is the message (e.g., "REVIEW DISK QUOTAS")
if #now() > #datevalue((Y), (M), (D))
output mail (MSG)
fi
begin
#piktexec "/dev/null" [if #day() == 1 =mailmsg1(review the orphans bypass,
REMINDER, =piktadmin) fi]
if #now() < #datevalue(2005, 10, 1)
set #bypass_orphans = #true()
else
set #bypass_orphans = #false()
endif
rule // if it's been more than #hrs hours since the last piktd_log
// entry, piktd is not logging, hence appears to be hung/dead;
do #split($time, ":")
set #t = #datevalue(#yrnow - #if(#monnow == 1 && $mon eq "Dec", 1, 0),
#monthnumber($mon),
#date)
+ #timevalue(#val($[1]), #val($[2]), #val($[3]))
if #timenow - #t > #hrs*60*60
output mail "piktd appears to be hung/dead on $sys"
endif
SEE ALSO
#timevalue()
#hour()
#minute()
#now()
#second()
#today()
Numerical Functions
String Functions