PostgreSQL Source Code  git master
pgtypes_date.h
Go to the documentation of this file.
1 /* src/interfaces/ecpg/include/pgtypes_date.h */
2 
3 #ifndef PGTYPES_DATETIME
4 #define PGTYPES_DATETIME
5 
6 #include <pgtypes.h>
7 #include <pgtypes_timestamp.h>
8 
9 typedef long date;
10 
11 #ifdef __cplusplus
12 extern "C"
13 {
14 #endif
15 
16 extern date * PGTYPESdate_new(void);
17 extern void PGTYPESdate_free(date * d);
18 extern date PGTYPESdate_from_asc(char *str, char **endptr);
19 extern char *PGTYPESdate_to_asc(date dDate);
21 extern void PGTYPESdate_julmdy(date jd, int *mdy);
22 extern void PGTYPESdate_mdyjul(int *mdy, date * jdate);
23 extern int PGTYPESdate_dayofweek(date dDate);
24 extern void PGTYPESdate_today(date * d);
25 extern int PGTYPESdate_defmt_asc(date * d, const char *fmt, const char *str);
26 extern int PGTYPESdate_fmt_asc(date dDate, const char *fmtstring, char *outbuf);
27 
28 #ifdef __cplusplus
29 }
30 #endif
31 
32 #endif /* PGTYPES_DATETIME */
const char * str
static void const char * fmt
date PGTYPESdate_from_timestamp(timestamp dt)
Definition: datetime.c:31
int PGTYPESdate_dayofweek(date dDate)
Definition: datetime.c:138
void PGTYPESdate_today(date *d)
Definition: datetime.c:148
long date
Definition: pgtypes_date.h:9
date PGTYPESdate_from_asc(char *str, char **endptr)
Definition: datetime.c:47
int PGTYPESdate_fmt_asc(date dDate, const char *fmtstring, char *outbuf)
Definition: datetime.c:167
int PGTYPESdate_defmt_asc(date *d, const char *fmt, const char *str)
Definition: datetime.c:329
void PGTYPESdate_julmdy(date jd, int *mdy)
Definition: datetime.c:115
void PGTYPESdate_free(date *d)
Definition: datetime.c:25
void PGTYPESdate_mdyjul(int *mdy, date *jdate)
Definition: datetime.c:128
char * PGTYPESdate_to_asc(date dDate)
Definition: datetime.c:101
date * PGTYPESdate_new(void)
Definition: datetime.c:15
int64 timestamp