Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
P
Postgres FD Implementation
Project overview
Project overview
Details
Activity
Releases
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Analytics
Analytics
CI / CD
Repository
Value Stream
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
Abuhujair Javed
Postgres FD Implementation
Commits
7a724a02
Commit
7a724a02
authored
Feb 13, 1999
by
Thomas G. Lockhart
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Include some Julian date declarations to share between various date/time
modules. Used to be in dt.c I think.
parent
0925e5f5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
30 additions
and
4 deletions
+30
-4
src/include/utils/dt.h
src/include/utils/dt.h
+24
-1
src/include/utils/int8.h
src/include/utils/int8.h
+6
-3
No files found.
src/include/utils/dt.h
View file @
7a724a02
...
...
@@ -8,7 +8,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: dt.h,v 1.3
4 1999/01/20 16:26:45
thomas Exp $
* $Id: dt.h,v 1.3
5 1999/02/13 04:15:33
thomas Exp $
*
*-------------------------------------------------------------------------
*/
...
...
@@ -262,6 +262,29 @@ extern int datetime_is_epoch(double j);
#define JROUND(j) (rint(((double) (j))*TIME_PREC_INV)/TIME_PREC_INV)
/*
* Date/time validation
* Include check for leap year.
*/
extern
int
day_tab
[
2
][
13
];
#define isleap(y) (((y % 4) == 0 && (y % 100) != 0) || (y % 400) == 0)
/* Julian date support for date2j() and j2date()
* Set the minimum year to one greater than the year of the first valid day
* to avoid having to check year and day both. - tgl 97/05/08
*/
#define JULIAN_MINYEAR (-4713)
#define JULIAN_MINMONTH (11)
#define JULIAN_MINDAY (23)
#define IS_VALID_JULIAN(y,m,d) ((y > JULIAN_MINYEAR) \
|| ((y == JULIAN_MINYEAR) && ((m > JULIAN_MINMONTH) \
|| ((m == JULIAN_MINMONTH) && (d >= JULIAN_MINDAY)))))
/*
* Date/time validation
* Include check for leap year.
...
...
src/include/utils/int8.h
View file @
7a724a02
...
...
@@ -6,7 +6,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
* $Id: int8.h,v 1.
8 1998/09/11 17:16:11 momjian
Exp $
* $Id: int8.h,v 1.
9 1999/02/13 04:13:56 thomas
Exp $
*
* NOTES
* These data types are supported on all 64-bit architectures, and may
...
...
@@ -88,13 +88,16 @@ extern int64 *int48div(int32 val1, int64 * val2);
extern
int64
*
int48
(
int32
val
);
extern
int32
int84
(
int64
*
val
);
#if
FALSE
#if
NOT_USED
extern
int64
*
int28
(
int16
val
);
extern
int16
int82
(
int64
*
val
);
#endif
extern
float64
i8tod
(
int64
*
val
);
extern
int64
*
dtoi8
(
float64
val
);
extern
text
*
int8_text
(
int64
*
val
);
extern
int64
*
text_int8
(
text
*
str
);
#endif
/* INT8_H */
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment