#minute()
DESCRIPTION returns the current minute (0-59) or: returns the minute portion (0-59) of the given datevalue/timevalue
SYNOPSIS #minute() or: #minute(d) or: #minute(t)
ARGUMENTS none or: d - a datevalue, or datevalue expression or: t - a timevalue, or timevalue expression
EXAMPLES
# pikt +C 'output $text(#minute())' 39 # pikt +C 'output $text(#minute(#now()))' 39
bypass_day_rollover
if ( #hour() == 23 )
|| ( #hour() == 0 && #minute() < 30 )
quit
fi
begin
// only run ~12:30 am
if #hour() != 0
quit
fi
if #minute() <= 30
exec wait "\=rm /tmp/ndbd.out.current 2>&1 2>/dev/null"
quit
fi
...
rule // note file name, update time, and whether or not stale
if $left($inlin,1) eq "/"
if #split($inlin) != 5
next
else
set #filhdr = #true()
set #stale = #false()
set $of = $1
set $mn = $2
set $dy = $3
set $hr = $4
set $mt = $5
set #ag = (#hour()*60 + #minute())
- (#val($hr)*60
+ #val($mt))
// if prior month or day
if $monthname() !~ $mn
|| #day() != #val($dy)
set #stale = #true()
set $stlout = "maybe stale,
last update $mn $dy $hr:$mt"
// else if same day, but more than 15 mins old
elsif #ag > 15
set #stale = #true()
set $stlout = "maybe stale,
last update $mn $dy $hr:$mt,
$text(#ag,0) minutes old"
fi
fi
next
fi
SEE ALSO #hour() #now() #second() #today() #datevalue() #timevalue() Numerical Functions String Functions