#!/bin/rc
pat = $1
if(~ $#pat 0)
pat = '{print}'
fn q {
seq $* | awk $pat
}
for(year in `{q 1970 1986})
echo $year `{dateof $year apr sun last>[2=]} `{dateof -w1 $year oct sun last>[2=]}
for(year in `{q 1987 2006})
echo $year `{dateof $year apr sun 1>[2=]} `{dateof -w1 $year oct sun last>[2=]}
for(year in `{q 2007 2037})
echo $year `{dateof $year mar sun 2>[2=]} `{dateof -w1 $year nov sun 1>[2=]}
|