No empty .Rs/.Re
[netbsd-mini2440.git] / share / zoneinfo / yearistype.sh
blobc480be94cdd281c69bfe582b9ef60572fdc73b2e
1 #! /bin/sh
3 # $NetBSD: yearistype.sh,v 1.5 2005/02/12 00:31:41 kleink Exp $
6 : 'This file is in the public domain, so clarified as of'
7 : '2006-07-17 by Arthur David Olson.'
9 : '@(#)yearistype.sh 8.2'
11 case $#-$1 in
12 2-|2-0*|2-*[!0-9]*)
13 echo "$0: wild year - $1" >&2
14 exit 1 ;;
15 esac
17 case $#-$2 in
18 2-even)
19 case $1 in
20 *[24680]) exit 0 ;;
21 *) exit 1 ;;
22 esac ;;
23 2-nonpres|2-nonuspres)
24 case $1 in
25 *[02468][048]|*[13579][26]) exit 1 ;;
26 *) exit 0 ;;
27 esac ;;
28 2-odd)
29 case $1 in
30 *[13579]) exit 0 ;;
31 *) exit 1 ;;
32 esac ;;
33 2-uspres)
34 case $1 in
35 *[02468][048]|*[13579][26]) exit 0 ;;
36 *) exit 1 ;;
37 esac ;;
38 2-*)
39 echo "$0: wild type - $2" >&2 ;;
40 esac
42 echo "$0: usage is $0 year even|odd|uspres|nonpres|nonuspres" >&2
43 exit 1