calendar.h revision 31529
1212795Sdim/*- 2212795Sdim * Copyright (c) 1997 Wolfgang Helbig 3212795Sdim * All rights reserved. 4212795Sdim * 5212795Sdim * Redistribution and use in source and binary forms, with or without 6212795Sdim * modification, are permitted provided that the following conditions 7212795Sdim * are met: 8212795Sdim * 1. Redistributions of source code must retain the above copyright 9212795Sdim * notice, this list of conditions and the following disclaimer. 10221345Sdim * 2. Redistributions in binary form must reproduce the above copyright 11212795Sdim * notice, this list of conditions and the following disclaimer in the 12212795Sdim * documentation and/or other materials provided with the distribution. 13212795Sdim * 14212795Sdim * THIS SOFTWARE IS PROVIDED BY THE AUTHOR AND CONTRIBUTORS ``AS IS'' AND 15212795Sdim * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 16212795Sdim * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 17212795Sdim * ARE DISCLAIMED. IN NO EVENT SHALL THE AUTHOR OR CONTRIBUTORS BE LIABLE 18212795Sdim * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 19212795Sdim * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 20212795Sdim * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 21212795Sdim * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 22249423Sdim * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 23263508Sdim * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 24218893Sdim * SUCH DAMAGE. 25212795Sdim * 26218893Sdim * $Id$ 27212795Sdim */ 28212795Sdimtypedef struct date { 29212795Sdim int y; /* year */ 30212795Sdim int m; /* month */ 31263508Sdim int d; /* day */ 32263508Sdim} date; 33263508Sdim 34263508Sdimdate *easterg(int _year, date *_dt); 35263508Sdimdate *easterj(int _year, date *_dt); 36263508Sdimdate *gdate(int _nd, date *_dt); 37263508Sdimdate *jdate(int _nd, date *_dt); 38263508Sdimint ndaysg(date *_dt); 39263508Sdimint ndaysj(date *_dt); 40263508Sdimint week(int _nd, int *_year); 41263508Sdimint weekday(int _nd); 42263508Sdim