File tree Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Expand file tree Collapse file tree 2 files changed +30
-4
lines changed Original file line number Diff line number Diff line change 8
8
*
9
9
* Copyright (c) 1994, Regents of the University of California
10
10
*
11
- * $Id: dt.h,v 1.34 1999/01/20 16:26:45 thomas Exp $
11
+ * $Id: dt.h,v 1.35 1999/02/13 04:15:33 thomas Exp $
12
12
*
13
13
*-------------------------------------------------------------------------
14
14
*/
@@ -262,6 +262,29 @@ extern int datetime_is_epoch(double j);
262
262
#define JROUND (j ) (rint(((double) (j))*TIME_PREC_INV)/TIME_PREC_INV)
263
263
264
264
265
+
266
+ /*
267
+ * Date/time validation
268
+ * Include check for leap year.
269
+ */
270
+
271
+ extern int day_tab [2 ][13 ];
272
+
273
+ #define isleap (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
+ #define JULIAN_MINYEAR (-4713)
281
+ #define JULIAN_MINMONTH (11)
282
+ #define JULIAN_MINDAY (23)
283
+
284
+ #define IS_VALID_JULIAN (y ,m ,d ) ((y > JULIAN_MINYEAR) \
285
+ || ((y == JULIAN_MINYEAR) && ((m > JULIAN_MINMONTH) \
286
+ || ((m == JULIAN_MINMONTH) && (d >= JULIAN_MINDAY)))))
287
+
265
288
/*
266
289
* Date/time validation
267
290
* Include check for leap year.
Original file line number Diff line number Diff line change 6
6
*
7
7
* Copyright (c) 1994, Regents of the University of California
8
8
*
9
- * $Id: int8.h,v 1.8 1998/09/11 17:16:11 momjian Exp $
9
+ * $Id: int8.h,v 1.9 1999/02/13 04:13:56 thomas Exp $
10
10
*
11
11
* NOTES
12
12
* These data types are supported on all 64-bit architectures, and may
@@ -88,13 +88,16 @@ extern int64 *int48div(int32 val1, int64 * val2);
88
88
extern int64 * int48 (int32 val );
89
89
extern int32 int84 (int64 * val );
90
90
91
- #if FALSE
91
+ #if NOT_USED
92
92
extern int64 * int28 (int16 val );
93
93
extern int16 int82 (int64 * val );
94
-
95
94
#endif
96
95
97
96
extern float64 i8tod (int64 * val );
98
97
extern int64 * dtoi8 (float64 val );
99
98
99
+ extern text * int8_text (int64 * val );
100
+ extern int64 * text_int8 (text * str );
101
+
100
102
#endif /* INT8_H */
103
+
You can’t perform that action at this time.
0 commit comments