home *** CD-ROM | disk | FTP | other *** search
- /*
- oaktime.h
-
- % header for time and date functions
-
- Moved to OWL from C-scape by Ted 8/01/90
-
- OWL 1.2
- Copyright (c) 1990, by Oakland Group, Inc.
- ALL RIGHTS RESERVED.
-
- Revision History:
- -----------------
- 8/01/90 ted included time.h right in here.
- 8/23/90 jmd added test for multiple inclusion
- 8/27/90 jmd removed time.h
- 9/21/90 pmcm changed extern to OEXTERN for time_result, result
- 10/23/90 jmd fixed START_DAY for new leap year calc
- */
-
- #ifndef _OAKTIMEH_
- #define _OAKTIMEH_
-
- #define START_DAY 0L
- #define TM_OVERFLOW -2147483647L
-
- /* global time data */
-
- OEXTERN int tm_daytab[2][13];
-
- OEXTERN struct tm time_result;
- OEXTERN struct tm *result;
-
- /* function prototypes */
-
- /* TMADD.C */
- extern struct tm *tm_AddSecs(struct tm *t, long seconds);
- extern struct tm *tm_AddDays(struct tm *t, long days);
- extern struct tm *tm_Adjust(struct tm *t);
- extern int tm_DaysInMonth(int month, int year);
- extern int tm_DayOfWeek(int mday, int month, int year);
- extern boolean tm_IsValid(struct tm *t);
-
- /* TMELAP.C */
- extern long tm_ElapSecs(struct tm *t1, struct tm *t2);
- extern long tm_ElapDays(struct tm *t1, struct tm *t2);
- extern int tm_Cmp(struct tm *t1, struct tm *t2);
-
- /* TMNOW.C */
- extern struct tm *tm_Now(struct tm *t);
- extern struct tm *tm_Copy(struct tm *dest, struct tm *source);
- extern struct tm *tm_Zero(struct tm *t);
-
- /* TMVALID.C */
- extern boolean tm_IsTimeValid(struct tm *t);
- extern boolean tm_IsDateValid(struct tm *t);
- extern int tm_LeapYear(int year);
-
- /* for date_funcs */
-
- #define COUNTRY 0
- /* adjusts style of date entry mm/dd/yy USA = 0
- dd/mm/yy EUR = 1
- yy/mm/dd JAP = 2
- */
-
- #define TIMEZONE -5 /* EST */
- /* corrects for timezone is auto date and time entry
- negative west of Greenwich, pos east
- */
-
- #define DAYLIGHT 1
- /* flag for daylight savings time correction
- 1 = TRUE (do correction)
- 0 = FALSE (don't correct)
- */
-
- #endif /* _OAKTIMEH_ */
-