#year()
DESCRIPTION
returns the current year (as a four-digit number)
or:
returns the year (as a four-digit number) of the given datevalue
SYNOPSIS
#year()
or:
#year(d)
ARGUMENTS
none
or:
d - a datevalue, or datevalue expression
EXAMPLES
# pikt +C 'output $text(#year())'
2007
# pikt +C 'output $text(#year(#now()))'
2007
rule // do only in even-numbered years
if #year() % 2 == 0 && ...
...
fi
set_datestamp // set $datestamp = "991215", for example
set $datestamp = $right($text(#year()),2) .
$if(#month()<10, "0", "") . $text(#month()) .
$if(#day()<10, "0", "") . $text(#day())
begin
set #timenow = #now()
set #yr = #year()
rule
set #mn = #monthnumber($mon)
set #msgage = #daysbetween(#datevalue(#yr, #mn, #date), #timenow)
SEE ALSO
$dayname()
$monthname()
#day()
#daynumber()
#month()
#monthnumber()
#weekday()
#yearday()
#yearweek()
String Functions
Numerical Functions