#daynumber()
DESCRIPTION
returns the current weekday as a digit (1-7)
or:
returns the weekday as a digit (1-7) for the given string representing a day of the week
("Sunday", "Monday", ...; "Sun", "Mon", ...)
SYNOPSIS
#daynumber()
or:
#daynumber(s)
ARGUMENTS
none
or:
s - a string, or string expression, representing a day of the week
("Sunday", "Monday", ...; "Sun", "Mon", ...)
EXAMPLES
# pikt +C 'output $text(#daynumber())'
4
# pikt +C 'output $text(#daynumber("Monday"))'
2
# pikt +C 'output $text(#daynumber("Sat"))'
7
rule // ignore scheduled reboots
if =reboot_period(#daynumber(), #hour())
next
fi
rule // every $patch has its own #dn value
set #dn = #daynumber()
...
rule // report if not found or unsuccessful
if $state eq "-"
if $state ne %state // report initial
|| #dn < %dn // repeat weekly
output mail "patch $patch not installed!"
endif
endif
SEE ALSO
#day()
#month()
#monthnumber()
#weekday()
#year()
#yearday()
#yearweek()
$dayname()
$monthname()
Numerical Functions
String Functions