xref: /freebsd/contrib/bc/tests/dc/scripts/easter.sh (revision 18054d0220cfc8df9c9568c437bd6fbb59d53c3c)
1#!/bin/sh
2
3if test $# -lt 2
4then
5	echo usage: $0 dc_exec year [options...]
6	exit 1
7fi
8
9dc_exec="$1"
10shift
11
12year="$1"
13shift
14
15echo $year '
16[
17	ddsf
18	[
19		lfp
20		[too early
21		]P
22		q
23	]s@
24	1583>@
25	ddd19%1+sg100/1+d3*4/12-sx8*5+25/5-sz5*4/lx-10-sdlg11*20+lz+lx-30%
26	d
27	[30+]s@
28	0>@d
29	[
30		[1+]s@
31		lg11<@
32	]s@
33	25=@d
34	[1+]s@
35	24=@se44le-d
36	[30+]s@
37	21>@dld+7%-7+
38	[March ]sm
39	d
40	[
41		31-
42		[April ]sm
43	]s@
44	31<@psnlmPpsn1z>p
45]sp
46lpx' | "$dc_exec" "$@" | tr '\012' ' '
47echo ''
48