initial import
[glibc.git] / time / yearistype
blobc7a886c25ba9ad9f7f4d2ebc74309014fa5b4f28
1 #! /bin/sh
3 : '@(#)yearistype.sh 7.3'
5 case $#-$2 in
6 2-even) case $1 in
7 *[24680]) exit 0 ;;
8 *) exit 1 ;;
9 esac ;;
10 2-nonpres) case $1 in
11 *[02468][048]|*[13567][26]) exit 1 ;;
12 *) exit 0 ;;
13 esac ;;
14 2-odd) case $1 in
15 *[13579]) exit 0 ;;
16 *) exit 1 ;;
17 esac ;;
18 2-uspres) case $1 in
19 *[02468][048]|*[13567][26]) exit 0 ;;
20 *) exit 1 ;;
21 esac ;;
22 2-*) echo "$0: wild type - $2" >&2
23 exit 1 ;;
24 *) echo "$0: usage is $0 year type" >&2
25 exit 1 ;;
26 esac