| 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); |
| 20 |
extern date PGTYPESdate_from_timestamp(timestamp dt); |
| 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 */ |