aboutsummaryrefslogtreecommitdiff
path: root/src/include/utils/datetime.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/utils/datetime.h')
-rw-r--r--src/include/utils/datetime.h29
1 files changed, 1 insertions, 28 deletions
diff --git a/src/include/utils/datetime.h b/src/include/utils/datetime.h
index 2880304fdbc..cd9eddacb03 100644
--- a/src/include/utils/datetime.h
+++ b/src/include/utils/datetime.h
@@ -1,7 +1,7 @@
/*-------------------------------------------------------------------------
*
* datetime.h
- * Definitions for the date/time and other date/time support code.
+ * Definitions for date/time support code.
* The support code is shared with other date data types,
* including abstime, reltime, date, and time.
*
@@ -16,9 +16,6 @@
#ifndef DATETIME_H
#define DATETIME_H
-#include <limits.h>
-#include <math.h>
-
#include "utils/timestamp.h"
/* this struct is declared in utils/tzparser.h: */
@@ -254,30 +251,6 @@ extern const int day_tab[2][13];
#define isleap(y) (((y) % 4) == 0 && (((y) % 100) != 0 || ((y) % 400) == 0))
-/* Julian date support for date2j() and j2date()
- *
- * IS_VALID_JULIAN checks the minimum date exactly, but is a bit sloppy
- * about the maximum, since it's far enough out to not be especially
- * interesting.
- */
-
-#define JULIAN_MINYEAR (-4713)
-#define JULIAN_MINMONTH (11)
-#define JULIAN_MINDAY (24)
-#define JULIAN_MAXYEAR (5874898)
-
-#define IS_VALID_JULIAN(y,m,d) ((((y) > JULIAN_MINYEAR) \
- || (((y) == JULIAN_MINYEAR) && (((m) > JULIAN_MINMONTH) \
- || (((m) == JULIAN_MINMONTH) && ((d) >= JULIAN_MINDAY))))) \
- && ((y) < JULIAN_MAXYEAR))
-
-#define JULIAN_MAX (2147483494) /* == date2j(JULIAN_MAXYEAR, 1 ,1) */
-
-/* Julian-date equivalents of Day 0 in Unix and Postgres reckoning */
-#define UNIX_EPOCH_JDATE 2440588 /* == date2j(1970, 1, 1) */
-#define POSTGRES_EPOCH_JDATE 2451545 /* == date2j(2000, 1, 1) */
-
-
/*
* Datetime input parsing routines (ParseDateTime, DecodeDateTime, etc)
* return zero or a positive value on success. On failure, they return