32 #ifndef ION_TIMESTAMP_H_
33 #define ION_TIMESTAMP_H_
57 uint16_t year, month, day;
58 uint16_t hours, minutes, seconds;
66 #define ION_TT_BIT_YEAR 0x01
67 #define ION_TT_BIT_MONTH 0x02
68 #define ION_TT_BIT_DAY 0x04
69 #define ION_TT_BIT_MIN 0x10
70 #define ION_TT_BIT_SEC 0x20
71 #define ION_TT_BIT_FRAC 0x40
73 #define ION_TS_YEAR (0x0 | ION_TT_BIT_YEAR)
74 #define ION_TS_MONTH (ION_TS_YEAR | ION_TT_BIT_MONTH)
75 #define ION_TS_DAY (ION_TS_MONTH | ION_TT_BIT_DAY)
76 #define ION_TS_MIN (ION_TS_DAY | ION_TT_BIT_MIN)
77 #define ION_TS_SEC (ION_TS_MIN | ION_TT_BIT_SEC)
78 #define ION_TS_FRAC (ION_TS_SEC | ION_TT_BIT_FRAC)
80 #define ION_MAX_TIMESTAMP_STRING (26+DECQUAD_String)
93 SIZE *output_length, decContext *pcontext);
100 SIZE *p_characters_used, decContext *pcontext);
122 BOOL *is_equal, decContext *pcontext);
128 BOOL *is_equal, decContext *pcontext);
150 int year,
int month);
161 int year,
int month,
int day);
172 int year,
int month,
int day,
int hours,
int minutes);
183 int year,
int month,
int day,
int hours,
int minutes,
int seconds);
196 int year,
int month,
int day,
int hours,
int minutes,
int seconds,
197 decQuad *p_fraction, decContext *pcontext);
207 int *p_year,
int *p_month);
213 int *p_year,
int *p_month,
int *p_day);
219 int *p_year,
int *p_month,
int *p_day,
int *p_hour,
int *p_minute);
225 int *p_year,
int *p_month,
int *p_day,
int *p_hour,
int *p_minute,
int *p_second);
231 int *p_year,
int *p_month,
int *p_day,
int *p_hour,
int *p_minute,
int *p_second,
232 decQuad *p_fraction);
ION_API_EXPORT iERR ion_timestamp_for_minute(ION_TIMESTAMP *ptime, int year, int month, int day, int hours, int minutes)
ION_API_EXPORT iERR ion_timestamp_get_thru_day(ION_TIMESTAMP *ptime, int *p_year, int *p_month, int *p_day)
ION_API_EXPORT iERR ion_timestamp_for_month(ION_TIMESTAMP *ptime, int year, int month)
ION_API_EXPORT iERR ion_timestamp_get_local_offset(ION_TIMESTAMP *ptime, int *p_offset_minutes)
ION_API_EXPORT iERR ion_timestamp_get_thru_year(ION_TIMESTAMP *ptime, int *p_year)
ION_API_EXPORT iERR ion_timestamp_for_year(ION_TIMESTAMP *ptime, int year)
ION_API_EXPORT iERR ion_timestamp_get_precision(const ION_TIMESTAMP *ptime, int *precision)
ION_API_EXPORT iERR ion_timestamp_get_thru_fraction(ION_TIMESTAMP *ptime, int *p_year, int *p_month, int *p_day, int *p_hour, int *p_minute, int *p_second, decQuad *p_fraction)
ION_API_EXPORT iERR ion_timestamp_get_thru_second(ION_TIMESTAMP *ptime, int *p_year, int *p_month, int *p_day, int *p_hour, int *p_minute, int *p_second)
ION_API_EXPORT iERR ion_timestamp_to_time_t(const ION_TIMESTAMP *ptime, time_t *time)
ION_API_EXPORT iERR ion_timestamp_equals(const ION_TIMESTAMP *ptime1, const ION_TIMESTAMP *ptime2, BOOL *is_equal, decContext *pcontext)
ION_API_EXPORT iERR ion_timestamp_parse(ION_TIMESTAMP *ptime, char *buffer, SIZE length, SIZE *p_characters_used, decContext *pcontext)
ION_API_EXPORT iERR ion_timestamp_has_local_offset(ION_TIMESTAMP *ptime, BOOL *p_has_local_offset)
ION_API_EXPORT iERR ion_timestamp_for_time_t(ION_TIMESTAMP *ptime, const time_t *time)
ION_API_EXPORT iERR ion_timestamp_unset_local_offset(ION_TIMESTAMP *ptime)
ION_API_EXPORT iERR ion_timestamp_for_second(ION_TIMESTAMP *ptime, int year, int month, int day, int hours, int minutes, int seconds)
ION_API_EXPORT iERR ion_timestamp_for_fraction(ION_TIMESTAMP *ptime, int year, int month, int day, int hours, int minutes, int seconds, decQuad *p_fraction, decContext *pcontext)
ION_API_EXPORT iERR ion_timestamp_get_thru_month(ION_TIMESTAMP *ptime, int *p_year, int *p_month)
ION_API_EXPORT iERR ion_timestamp_for_day(ION_TIMESTAMP *ptime, int year, int month, int day)
ION_API_EXPORT iERR ion_timestamp_set_local_offset(ION_TIMESTAMP *ptime, int offset_minutes)
ION_API_EXPORT iERR ion_timestamp_to_string(ION_TIMESTAMP *ptime, char *buffer, SIZE buf_length, SIZE *output_length, decContext *pcontext)
ION_API_EXPORT iERR ion_timestamp_get_thru_minute(ION_TIMESTAMP *ptime, int *p_year, int *p_month, int *p_day, int *p_hour, int *p_minute)
ION_API_EXPORT iERR ion_timestamp_instant_equals(const ION_TIMESTAMP *ptime1, const ION_TIMESTAMP *ptime2, BOOL *is_equal, decContext *pcontext)
Definition: ion_timestamp.h:47
uint8_t precision
Definition: ion_timestamp.h:51
int16_t tz_offset
Definition: ion_timestamp.h:56
decQuad fraction
Definition: ion_timestamp.h:63