|
|||
Prex Home / Browse Source - Prex Version: 0.9.0 |
|||
root/usr/include/tzfile.h/* [<][>][^][v][top][bottom][index][help] */INCLUDED FROM1 /* 2 * Copyright (c) 1988, 1993 3 * The Regents of the University of California. All rights reserved. 4 * 5 * This code is derived from software contributed to Berkeley by 6 * Arthur David Olson of the National Cancer Institute. 7 * 8 * Redistribution and use in source and binary forms, with or without 9 * modification, are permitted provided that the following conditions 10 * are met: 11 * 1. Redistributions of source code must retain the above copyright 12 * notice, this list of conditions and the following disclaimer. 13 * 2. Redistributions in binary form must reproduce the above copyright 14 * notice, this list of conditions and the following disclaimer in the 15 * documentation and/or other materials provided with the distribution. 16 * 3. Neither the name of the University nor the names of its contributors 17 * may be used to endorse or promote products derived from this software 18 * without specific prior written permission. 19 * 20 * THIS SOFTWARE IS PROVIDED BY THE REGENTS AND CONTRIBUTORS ``AS IS'' AND 21 * ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE 22 * IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE 23 * ARE DISCLAIMED. IN NO EVENT SHALL THE REGENTS OR CONTRIBUTORS BE LIABLE 24 * FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL 25 * DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS 26 * OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) 27 * HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT 28 * LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY 29 * OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF 30 * SUCH DAMAGE. 31 * 32 * @(#)tzfile.h 8.1 (Berkeley) 6/2/93 33 */ 34 35 #ifndef _TZFILE_H_ 36 #define _TZFILE_H_ 37 38 #define SECSPERMIN 60 39 #define MINSPERHOUR 60 40 #define HOURSPERDAY 24 41 #define DAYSPERWEEK 7 42 #define DAYSPERNYEAR 365 43 #define DAYSPERLYEAR 366 44 #define SECSPERHOUR (SECSPERMIN * MINSPERHOUR) 45 #define SECSPERDAY ((long) SECSPERHOUR * HOURSPERDAY) 46 #define MONSPERYEAR 12 47 48 #define TM_SUNDAY 0 49 #define TM_MONDAY 1 50 #define TM_TUESDAY 2 51 #define TM_WEDNESDAY 3 52 #define TM_THURSDAY 4 53 #define TM_FRIDAY 5 54 #define TM_SATURDAY 6 55 56 #define TM_JANUARY 0 57 #define TM_FEBRUARY 1 58 #define TM_MARCH 2 59 #define TM_APRIL 3 60 #define TM_MAY 4 61 #define TM_JUNE 5 62 #define TM_JULY 6 63 #define TM_AUGUST 7 64 #define TM_SEPTEMBER 8 65 #define TM_OCTOBER 9 66 #define TM_NOVEMBER 10 67 #define TM_DECEMBER 11 68 69 #define TM_YEAR_BASE 1900 70 71 #define EPOCH_YEAR 1970 72 #define EPOCH_WDAY TM_THURSDAY 73 74 /* 75 ** Accurate only for the past couple of centuries; 76 ** that will probably do. 77 */ 78 79 #define isleap(y) ((((y) % 4) == 0 && ((y) % 100) != 0) || ((y) % 400) == 0) 80 81 #endif /* !_TZFILE_H_ */ /* [<][>][^][v][top][bottom][index][help] */ | |||
Copyright© 2005-2009 Kohsuke Ohtani |