Move some useful date/time test macros to here to allow

sharing across files.
This commit is contained in:
Thomas G. Lockhart 1999-04-15 02:24:23 +00:00
parent 879d1be2fe
commit 99e57ee86f
1 changed files with 15 additions and 1 deletions

View File

@ -8,7 +8,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: dt.h,v 1.38 1999/03/14 16:03:16 momjian Exp $
* $Id: dt.h,v 1.39 1999/04/15 02:24:23 thomas Exp $
*
*-------------------------------------------------------------------------
*/
@ -285,6 +285,20 @@ extern int day_tab[2][13];
|| ((y == JULIAN_MINYEAR) && ((m > JULIAN_MINMONTH) \
|| ((m == JULIAN_MINMONTH) && (d >= JULIAN_MINDAY)))))
#define UTIME_MINYEAR (1901)
#define UTIME_MINMONTH (12)
#define UTIME_MINDAY (14)
#define UTIME_MAXYEAR (2038)
#define UTIME_MAXMONTH (01)
#define UTIME_MAXDAY (18)
#define IS_VALID_UTIME(y,m,d) (((y > UTIME_MINYEAR) \
|| ((y == UTIME_MINYEAR) && ((m > UTIME_MINMONTH) \
|| ((m == UTIME_MINMONTH) && (d >= UTIME_MINDAY))))) \
&& ((y < UTIME_MAXYEAR) \
|| ((y == UTIME_MAXYEAR) && ((m < UTIME_MAXMONTH) \
|| ((m == UTIME_MAXMONTH) && (d <= UTIME_MAXDAY))))))
/*
* dt.c prototypes
*/