|
8 | 8 | * |
9 | 9 | * Copyright (c) 1994, Regents of the University of California |
10 | 10 | * |
11 | | - * $Id: dt.h,v 1.36 1999/02/13 23:22:17 momjian Exp $ |
| 11 | + * $Id: dt.h,v 1.37 1999/03/0622:58:11 tgl Exp $ |
12 | 12 | * |
13 | 13 | *------------------------------------------------------------------------- |
14 | 14 | */ |
@@ -270,29 +270,7 @@ extern intdatetime_is_epoch(double j); |
270 | 270 |
|
271 | 271 | externintday_tab[2][13]; |
272 | 272 |
|
273 | | -#defineisleap(y) (((y % 4) == 0 && (y % 100) != 0) || (y % 400) == 0) |
274 | | - |
275 | | -/* Julian date support for date2j() and j2date() |
276 | | - * Set the minimum year to one greater than the year of the first valid day |
277 | | - * to avoid having to check year and day both. - tgl 97/05/08 |
278 | | - */ |
279 | | - |
280 | | -#defineJULIAN_MINYEAR (-4713) |
281 | | -#defineJULIAN_MINMONTH (11) |
282 | | -#defineJULIAN_MINDAY (23) |
283 | | - |
284 | | -#defineIS_VALID_JULIAN(y,m,d) ((y > JULIAN_MINYEAR) \ |
285 | | - || ((y == JULIAN_MINYEAR) && ((m > JULIAN_MINMONTH) \ |
286 | | - || ((m == JULIAN_MINMONTH) && (d >= JULIAN_MINDAY))))) |
287 | | - |
288 | | -/* |
289 | | - * Date/time validation |
290 | | - * Include check for leap year. |
291 | | - */ |
292 | | - |
293 | | -externintday_tab[2][13]; |
294 | | - |
295 | | -#defineisleap(y) (((y % 4) == 0 && (y % 100) != 0) || (y % 400) == 0) |
| 273 | +#defineisleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0)) |
296 | 274 |
|
297 | 275 | /* Julian date support for date2j() and j2date() |
298 | 276 | * Set the minimum year to one greater than the year of the first valid day |
|