Update.
[glibc.git] / timezone / yearistype
blob8d796f1f218e9ab36bdde678409550698813181c
1 #! /bin/sh
3 : '@(#)yearistype.sh 7.7'
5 case $#-$1 in
6 2-|2-0*|2-*[!0-9]*)
7 echo "$0: wild year - $1" >&2
8 exit 1 ;;
9 esac
11 case $#-$2 in
12 2-even)
13 case $1 in
14 *[24680]) exit 0 ;;
15 *) exit 1 ;;
16 esac ;;
17 2-nonpres|2-nonuspres)
18 case $1 in
19 *[02468][048]|*[13579][26]) exit 1 ;;
20 *) exit 0 ;;
21 esac ;;
22 2-odd)
23 case $1 in
24 *[13579]) exit 0 ;;
25 *) exit 1 ;;
26 esac ;;
27 2-uspres)
28 case $1 in
29 *[02468][048]|*[13579][26]) exit 0 ;;
30 *) exit 1 ;;
31 esac ;;
32 2-*)
33 echo "$0: wild type - $2" >&2 ;;
34 esac
36 echo "$0: usage is $0 year even|odd|uspres|nonpres|nonuspres" >&2
37 exit 1