$ampm()
DESCRIPTION
returns "AM" if the current or given time falls between midnight and twelve noon\,
else "PM" if between noon and midnight
SYNOPSIS
$ampm()
or:
$ampm(d)
ARGUMENTS
none, for the current time
or:
d - a datevalue, or datevalue expression
EXAMPLES
# date
Tue Jun 11 22:35:16 CDT 2007
# pikt +C 'output $ampm()'
PM
# pikt +C 'output $ampm(#now())'
PM
rule
if $ampm() eq "PM"
=hourly(output mail $inlin, )
else
=every_two_hours(output mail $inlin, )
fi
rule
output syslog "current time is $text(#hour()):$text(#minute()):
$text(#second()) $ampm()"
SEE ALSO
String Functions
Numerical Functions