xref: /freebsd/lib/libcalendar/calendar.h (revision 306a501f3520479370df138f56bb5ef612944c59)
1306a501fSWolfgang Helbig /*-
2306a501fSWolfgang Helbig  * Copyright (c) 1997 Wolfgang Helbig
3306a501fSWolfgang Helbig  * All rights reserved.
4306a501fSWolfgang Helbig  *
5306a501fSWolfgang Helbig  * Redistribution and use in source and binary forms, with or without
6306a501fSWolfgang Helbig  * modification, are permitted provided that the following conditions
7306a501fSWolfgang Helbig  * are met:
8306a501fSWolfgang Helbig  * 1. Redistributions of source code must retain the above copyright
9306a501fSWolfgang Helbig  *    notice, this list of conditions and the following disclaimer.
10306a501fSWolfgang Helbig  * 2. Redistributions in binary form must reproduce the above copyright
11306a501fSWolfgang Helbig  *    notice, this list of conditions and the following disclaimer in the
12306a501fSWolfgang Helbig  *    documentation and/or other materials provided with the distribution.
13306a501fSWolfgang Helbig  *
14306a501fSWolfgang Helbig  * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND
15306a501fSWolfgang Helbig  * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
16306a501fSWolfgang Helbig  * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
17306a501fSWolfgang Helbig  * ARE DISCLAIMED.  IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE
18306a501fSWolfgang Helbig  * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL
19306a501fSWolfgang Helbig  * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS
20306a501fSWolfgang Helbig  * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION)
21306a501fSWolfgang Helbig  * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT
22306a501fSWolfgang Helbig  * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY
23306a501fSWolfgang Helbig  * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF
24306a501fSWolfgang Helbig  * SUCH DAMAGE.
25306a501fSWolfgang Helbig  *
26306a501fSWolfgang Helbig  *	$Id$
27306a501fSWolfgang Helbig  */
28306a501fSWolfgang Helbig typedef struct date {
29306a501fSWolfgang Helbig 	int y;	/* year */
30306a501fSWolfgang Helbig 	int m;	/* month */
31306a501fSWolfgang Helbig 	int d;	/* day */
32306a501fSWolfgang Helbig } date;
33306a501fSWolfgang Helbig 
34306a501fSWolfgang Helbig date    *easterg(int _year, date *_dt);
35306a501fSWolfgang Helbig date    *easterj(int _year, date *_dt);
36306a501fSWolfgang Helbig date	*gdate(int _nd,  date *_dt);
37306a501fSWolfgang Helbig date	*jdate(int _nd, date *_dt);
38306a501fSWolfgang Helbig int	 ndaysg(date *_dt);
39306a501fSWolfgang Helbig int	 ndaysj(date *_dt);
40306a501fSWolfgang Helbig int	 week(int _nd, int *_year);
41306a501fSWolfgang Helbig int	 weekday(int _nd);
42