Remove extra whitespace at the end of some lines.
[dragonfly.git] / share / zoneinfo / yearistype.sh
CommitLineData
984263bc
MD
1#! /bin/sh
2
3# $FreeBSD: src/share/zoneinfo/yearistype.sh,v 1.1.2.3.8.1 2000/10/25 19:44:09 wollman Exp $
e5af4fe3 4# $DragonFly: src/share/zoneinfo/yearistype.sh,v 1.3 2005/07/13 21:08:07 swildner Exp $
984263bc 5
e5af4fe3 6: '@(#)yearistype.sh 7.8'
984263bc
MD
7
8case $#-$1 in
9 2-|2-0*|2-*[!0-9]*)
10 echo "$0: wild year - $1" >&2
11 exit 1 ;;
12esac
13
14case $#-$2 in
e5af4fe3 15 2-even)
984263bc
MD
16 case $1 in
17 *[24680]) exit 0 ;;
18 *) exit 1 ;;
19 esac ;;
20 2-nonpres|2-nonuspres)
21 case $1 in
22 *[02468][048]|*[13579][26]) exit 1 ;;
23 *) exit 0 ;;
24 esac ;;
e5af4fe3 25 2-odd)
984263bc
MD
26 case $1 in
27 *[13579]) exit 0 ;;
28 *) exit 1 ;;
29 esac ;;
30 2-uspres)
31 case $1 in
32 *[02468][048]|*[13579][26]) exit 0 ;;
33 *) exit 1 ;;
34 esac ;;
e5af4fe3 35 2-*)
984263bc
MD
36 echo "$0: wild type - $2" >&2 ;;
37esac
38
39echo "$0: usage is $0 year even|odd|uspres|nonpres|nonuspres" >&2
40exit 1