#!/bin/rc
pat = $1
if(~ $#pat 0)
pat = '{print}'
fn q {
seq $* | awk $pat
}
for(year in `{q 1970 1973})
echo $year `{dateof $year apr sun last>[2=]} `{dateof -w1 $year oct sun last>[2=]}
for(year in `{q 1974 1974})
echo $year `{dateof $year jan sun 1>[2=]} `{dateof -w1 $year oct sun last>[2=]}
for(year in `{q 1975 1975})
echo $year `{dateof $year feb sun last>[2=]} `{dateof -w1 $year oct sun last>[2=]}
for(year in `{q 1976 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=]}
|