]> git.saurik.com Git - apple/system_cmds.git/blob - zic.tproj/datfiles/yearistype.sh
system_cmds-196.tar.gz
[apple/system_cmds.git] / zic.tproj / datfiles / yearistype.sh
1 #! /bin/sh
2 # $OpenBSD: yearistype.sh,v 1.3 1997/01/14 04:36:58 millert Exp $
3
4 : '@(#)yearistype.sh 7.4'
5
6 case $#-$2 in
7 2-even) case $1 in
8 *[24680]) exit 0 ;;
9 *) exit 1 ;;
10 esac ;;
11 2-nonpres) case $1 in
12 *[02468][048]|*[13579][26]) exit 1 ;;
13 *) exit 0 ;;
14 esac ;;
15 2-odd) case $1 in
16 *[13579]) exit 0 ;;
17 *) exit 1 ;;
18 esac ;;
19 2-uspres) case $1 in
20 *[02468][048]|*[13579][26]) exit 0 ;;
21 *) exit 1 ;;
22 esac ;;
23 2-*) echo "$0: wild type - $2" >&2
24 exit 1 ;;
25 *) echo "$0: usage is $0 year type" >&2
26 exit 1 ;;
27 esac