summaryrefslogtreecommitdiff
path: root/src/include/utils/dt.h
diff options
context:
space:
mode:
Diffstat (limited to 'src/include/utils/dt.h')
-rw-r--r--src/include/utils/dt.h40
1 files changed, 22 insertions, 18 deletions
diff --git a/src/include/utils/dt.h b/src/include/utils/dt.h
index fe583b8641c..c027e7e4247 100644
--- a/src/include/utils/dt.h
+++ b/src/include/utils/dt.h
@@ -8,7 +8,7 @@
*
* Copyright (c) 1994, Regents of the University of California
*
- * $Id: dt.h,v 1.27 1998/02/13 17:12:07 scrappy Exp $
+ * $Id: dt.h,v 1.28 1998/02/26 04:43:58 momjian Exp $
*
*-------------------------------------------------------------------------
*/
@@ -128,7 +128,7 @@ typedef struct
* so actually restrict them to within [0,31] for now.
* - thomas 97/06/19
* Not all of these fields are used for masks in DecodeDateDelta
- * so allow some larger than 31. - thomas 1997-11-17
+ * so allow some larger than 31. - thomas 1997-11-17
*/
#define DTK_NUMBER 0
@@ -271,7 +271,7 @@ extern bool datetime_le(DateTime *dt1, DateTime *dt2);
extern bool datetime_ge(DateTime *dt1, DateTime *dt2);
extern bool datetime_gt(DateTime *dt1, DateTime *dt2);
extern bool datetime_finite(DateTime *datetime);
-extern int datetime_cmp(DateTime *dt1, DateTime *dt2);
+extern int datetime_cmp(DateTime *dt1, DateTime *dt2);
extern DateTime *datetime_smaller(DateTime *dt1, DateTime *dt2);
extern DateTime *datetime_larger(DateTime *dt1, DateTime *dt2);
@@ -284,7 +284,7 @@ extern bool timespan_le(TimeSpan *span1, TimeSpan *span2);
extern bool timespan_ge(TimeSpan *span1, TimeSpan *span2);
extern bool timespan_gt(TimeSpan *span1, TimeSpan *span2);
extern bool timespan_finite(TimeSpan *span);
-extern int timespan_cmp(TimeSpan *span1, TimeSpan *span2);
+extern int timespan_cmp(TimeSpan *span1, TimeSpan *span2);
extern TimeSpan *timespan_smaller(TimeSpan *span1, TimeSpan *span2);
extern TimeSpan *timespan_larger(TimeSpan *span1, TimeSpan *span2);
@@ -310,30 +310,34 @@ extern TimeSpan *datetime_age(DateTime *dt1, DateTime *dt2);
extern void GetCurrentTime(struct tm * tm);
extern DateTime SetDateTime(DateTime datetime);
-extern int tm2datetime(struct tm * tm, double fsec, int *tzp, DateTime *dt);
-extern int datetime2tm(DateTime dt, int *tzp, struct tm * tm, double *fsec, char **tzn);
-extern int timespan2tm(TimeSpan span, struct tm * tm, float8 *fsec);
-extern int tm2timespan(struct tm * tm, double fsec, TimeSpan *span);
+extern int tm2datetime(struct tm * tm, double fsec, int *tzp, DateTime *dt);
+extern int datetime2tm(DateTime dt, int *tzp, struct tm * tm, double *fsec, char **tzn);
+extern int timespan2tm(TimeSpan span, struct tm * tm, float8 *fsec);
+extern int tm2timespan(struct tm * tm, double fsec, TimeSpan *span);
extern void j2date(int jd, int *year, int *month, int *day);
-extern int date2j(int year, int month, int day);
+extern int date2j(int year, int month, int day);
extern double time2t(const int hour, const int min, const double sec);
-extern int ParseDateTime(char *timestr, char *lowstr,
+extern int
+ParseDateTime(char *timestr, char *lowstr,
char *field[], int ftype[], int maxfields, int *numfields);
-extern int DecodeDateTime(char *field[], int ftype[],
+extern int
+DecodeDateTime(char *field[], int ftype[],
int nf, int *dtype, struct tm * tm, double *fsec, int *tzp);
-extern int DecodeTimeOnly(char *field[], int ftype[], int nf,
+extern int
+DecodeTimeOnly(char *field[], int ftype[], int nf,
int *dtype, struct tm * tm, double *fsec);
-extern int DecodeDateDelta(char *field[], int ftype[],
+extern int
+DecodeDateDelta(char *field[], int ftype[],
int nf, int *dtype, struct tm * tm, double *fsec);
-extern int EncodeDateOnly(struct tm * tm, int style, char *str);
-extern int EncodeTimeOnly(struct tm * tm, double fsec, int style, char *str);
-extern int EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, char *str);
-extern int EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str);
+extern int EncodeDateOnly(struct tm * tm, int style, char *str);
+extern int EncodeTimeOnly(struct tm * tm, double fsec, int style, char *str);
+extern int EncodeDateTime(struct tm * tm, double fsec, int *tzp, char **tzn, int style, char *str);
+extern int EncodeTimeSpan(struct tm * tm, double fsec, int style, char *str);
-#endif /* DT_H */
+#endif /* DT_H */