PostgreSQL Source Code
git master
|
Go to the source code of this file.
Typedefs | |
typedef long | date |
Functions | |
date * | PGTYPESdate_new (void) |
void | PGTYPESdate_free (date *d) |
date | PGTYPESdate_from_asc (char *str, char **endptr) |
char * | PGTYPESdate_to_asc (date dDate) |
date | PGTYPESdate_from_timestamp (timestamp dt) |
void | PGTYPESdate_julmdy (date jd, int *mdy) |
void | PGTYPESdate_mdyjul (int *mdy, date *jdate) |
int | PGTYPESdate_dayofweek (date dDate) |
void | PGTYPESdate_today (date *d) |
int | PGTYPESdate_defmt_asc (date *d, const char *fmt, const char *str) |
int | PGTYPESdate_fmt_asc (date dDate, const char *fmtstring, char *outbuf) |
typedef long date |
Definition at line 9 of file pgtypes_date.h.
int PGTYPESdate_dayofweek | ( | date | dDate | ) |
Definition at line 138 of file datetime.c.
References date2j().
Referenced by main(), PGTYPESdate_fmt_asc(), PGTYPEStimestamp_fmt_asc(), and rdayofweek().
int PGTYPESdate_defmt_asc | ( | date * | d, |
const char * | fmt, | ||
const char * | str | ||
) |
Definition at line 329 of file datetime.c.
References date2j(), fmt, free, i, j, sort-test::list, months, MONTHS_PER_YEAR, pg_tolower(), pgtypes_alloc(), PGTYPES_DATE_BAD_DAY, PGTYPES_DATE_BAD_MONTH, PGTYPES_DATE_ERR_EARGS, PGTYPES_DATE_ERR_ENOSHORTDATE, PGTYPES_DATE_ERR_ENOTDMY, PGTYPES_DATE_MONTH_MAXLENGTH, pgtypes_date_months, pgtypes_strdup(), str, tm, pg_tm::tm_mday, pg_tm::tm_mon, pg_tm::tm_year, and token.
Referenced by main(), and rdefmtdate().
int PGTYPESdate_fmt_asc | ( | date | dDate, |
const char * | fmtstring, | ||
char * | outbuf | ||
) |
Definition at line 167 of file datetime.c.
References date2j(), format, free, i, j2date(), months, pgtypes_alloc(), PGTYPES_DATE_NUM_MAX_DIGITS, pgtypes_date_weekdays_short, PGTYPES_FMTDATE_DAY_DIGITS_LZ, PGTYPES_FMTDATE_DOW_LITERAL_SHORT, PGTYPES_FMTDATE_MONTH_DIGITS_LZ, PGTYPES_FMTDATE_MONTH_LITERAL_SHORT, PGTYPES_FMTDATE_YEAR_DIGITS_LONG, PGTYPES_FMTDATE_YEAR_DIGITS_SHORT, PGTYPES_TYPE_STRING_CONSTANT, PGTYPES_TYPE_STRING_MALLOCED, PGTYPES_TYPE_UINT, PGTYPES_TYPE_UINT_2_LZ, PGTYPES_TYPE_UINT_4_LZ, PGTYPESdate_dayofweek(), snprintf, un_fmt_comb::str_val, tm, pg_tm::tm_mday, pg_tm::tm_mon, pg_tm::tm_year, and un_fmt_comb::uint_val.
Referenced by main(), and rfmtdate().
void PGTYPESdate_free | ( | date * | d | ) |
date PGTYPESdate_from_asc | ( | char * | str, |
char ** | endptr | ||
) |
Definition at line 47 of file datetime.c.
References date2j(), DecodeDateTime(), DTK_DATE, DTK_EPOCH, GetEpochTime(), MAXDATEFIELDS, MAXDATELEN, ParseDateTime(), PGTYPES_DATE_BAD_DATE, str, tm, pg_tm::tm_mday, pg_tm::tm_mon, and pg_tm::tm_year.
Referenced by ecpg_get_data(), and main().
Definition at line 31 of file datetime.c.
References TIMESTAMP_NOT_FINITE, and USECS_PER_DAY.
Referenced by main(), and PGTYPEStimestamp_fmt_asc().
void PGTYPESdate_julmdy | ( | date | jd, |
int * | mdy | ||
) |
void PGTYPESdate_mdyjul | ( | int * | mdy, |
date * | jdate | ||
) |
date* PGTYPESdate_new | ( | void | ) |
char* PGTYPESdate_to_asc | ( | date | dDate | ) |
Definition at line 101 of file datetime.c.
References buf, date2j(), DateStyle, EncodeDateOnly(), j2date(), MAXDATELEN, pgtypes_strdup(), tm, pg_tm::tm_mday, pg_tm::tm_mon, and pg_tm::tm_year.
Referenced by ecpg_store_input(), main(), and rdatestr().
void PGTYPESdate_today | ( | date * | d | ) |
Definition at line 148 of file datetime.c.
References date2j(), GetCurrentDateTime(), and tm.
Referenced by rtoday().