Plan 9 from Bell Labs’s /usr/web/sources/contrib/quanstro/timezone/gendstpairsus

Copyright © 2021 Plan 9 Foundation.
Distributed under the MIT License.
Download the Plan 9 distribution.


#!/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=]}

Bell Labs OSI certified Powered by Plan 9

(Return to Plan 9 Home Page)

Copyright © 2021 Plan 9 Foundation. All Rights Reserved.
Comments to [email protected].