Adaptive Framework  0.9.0
All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Modules Pages
Macros | Functions
afw_time.h File Reference

Header for Adaptive Framework Time Support. More...

#include "afw_interface.h"

Go to the source code of this file.

Macros

#define AFW_TIME_SECONDS_TO_MICROSECONDS(SECONDS)    (afw_integer_t)(SECONDS) * (afw_integer_t)1000000
 
#define AFW_TIME_MINUTES_TO_MICROSECONDS(MINUTES)
 
#define AFW_TIME_HOURS_TO_MICROSECONDS(HOURS)
 
#define AFW_TIME_DAYS_TO_MICROSECONDS(DAYS)
 

Functions

void afw_date_set_from_parts (afw_date_t *date, int year, int month, int day, int tz_hours_offset, int tz_minutes_offset, afw_xctx_t *xctx)
 Set afw_date_t from parts. More...
 
const afw_date_tafw_date_create_from_parts (int year, int month, int day, int tz_hours_offset, int tz_minutes_offset, const afw_pool_t *p, afw_xctx_t *xctx)
 Create afw_date_t from parts in specific pool. More...
 
void afw_dateTime_set_from_apr_time (afw_dateTime_t *dateTime, apr_time_t apr_time, afw_xctx_t *xctx)
 Set afw_dateTime_t from apr_time. More...
 
const afw_dateTime_tafw_dateTime_create_from_apr_time (apr_time_t apr_time, const afw_pool_t *p, afw_xctx_t *xctx)
 Create afw_dateTime_t from apr time. More...
 
void afw_dateTime_set_from_parts (afw_dateTime_t *dateTime, int year, int month, int day, int hour, int minute, int second, int microsecond, int tz_hours_offset, int tz_minutes_offset, afw_xctx_t *xctx)
 Set afw_dateTime_t from parts. More...
 
const afw_dateTime_tafw_dateTime_create_from_parts (int year, int month, int day, int hour, int minute, int second, int microsecond, int tz_hours_offset, int tz_minutes_offset, const afw_pool_t *p, afw_xctx_t *xctx)
 Create afw_dateTime_t from parts in specific pool. More...
 
void afw_dayTimeDuration_set_from_parts (afw_dayTimeDuration_t *dayTimeDuration, afw_boolean_t is_positive, int days, int hours, int minutes, int seconds, int microseconds, afw_xctx_t *xctx)
 Set afw_dayTimeDuration_t from parts. More...
 
const afw_dayTimeDuration_tafw_dayTimeDuration_create_from_parts (afw_boolean_t is_positive, afw_int32_t days, afw_int32_t hours, afw_int32_t minutes, afw_int32_t seconds, afw_int32_t microseconds, const afw_pool_t *p, afw_xctx_t *xctx)
 Create afw_dayTimeDuration_t from parts in specific pool. More...
 
void afw_time_set_from_parts (afw_time_t *time, int hour, int minute, int second, int microsecond, int tz_hours_offset, int tz_minutes_offset, afw_xctx_t *xctx)
 Set afw_time_t from parts. More...
 
const afw_time_tafw_time_create_from_parts (int hour, int minute, int second, int microsecond, int tz_hours_offset, int tz_minutes_offset, const afw_pool_t *p, afw_xctx_t *xctx)
 Create afw_time_t from parts in specific pool. More...
 
void afw_yearMonthDuration_set_from_parts (afw_yearMonthDuration_t *yearMonthDuration, afw_boolean_t is_positive, int years, int months, afw_xctx_t *xctx)
 Set afw_yearMonthDuration_t from parts. More...
 
const afw_yearMonthDuration_tafw_yearMonthDuration_create_from_parts (afw_boolean_t is_positive, afw_int32_t years, afw_int32_t months, const afw_pool_t *p, afw_xctx_t *xctx)
 Create afw_yearMonthDuration_t from parts in specific pool. More...
 
void afw_dateTime_set_now (afw_dateTime_t *dateTime_local, afw_dateTime_t *dateTime_utc, afw_xctx_t *xctx)
 Set local and/or utc dateTime to now. More...
 
void afw_time_set_now (afw_time_t *time_local, afw_time_t *time_utc, afw_xctx_t *xctx)
 Set local and/or utc time to now. More...
 
const afw_dateTime_tafw_dateTime_now_utc (const afw_pool_t *p, afw_xctx_t *xctx)
 Get now time as dateTime in specified pool. More...
 
const afw_time_tafw_time_now_utc (const afw_pool_t *p, afw_xctx_t *xctx)
 Get now time as time only in specified pool. More...
 
const afw_dateTime_tafw_dateTime_now_local (const afw_pool_t *p, afw_xctx_t *xctx)
 Get now local time as dateTime in specified pool. More...
 
const afw_time_tafw_time_now_local (const afw_pool_t *p, afw_xctx_t *xctx)
 Get now local time as time only in specified pool. More...
 
afw_integer_t afw_time_to_microseconds_utc (const afw_time_t *time, afw_xctx_t *xctx)
 Convert time normalize to utc to microseconds. More...
 
int afw_date_maximum_days_in_month (afw_integer_t year, afw_integer_t month)
 Determine maximum days in a month. More...
 
const afw_utf8_tafw_date_internal_to_utf8 (const afw_date_t *date, const afw_pool_t *p, afw_xctx_t *xctx)
 Convert internal date to utf8 xml schema date in specified pool. More...
 
void afw_date_utf8_set_internal (const afw_utf8_t *utf8, afw_date_t *internal, afw_xctx_t *xctx)
 Convert utf8 xml schema date to internal and set. More...
 
const afw_utf8_tafw_dateTime_internal_to_utf8 (const afw_dateTime_t *dateTime, const afw_pool_t *p, afw_xctx_t *xctx)
 Convert internal dateTime to utf8 xml schema dateTime in specified pool. More...
 
void afw_dateTime_utf8_set_internal (const afw_utf8_t *utf8, afw_dateTime_t *internal, afw_xctx_t *xctx)
 Convert utf8 xml schema dateTime to internal and set. More...
 
const afw_utf8_tafw_dayTimeDuration_internal_to_utf8 (const afw_dayTimeDuration_t *dayTimeDuration, const afw_pool_t *p, afw_xctx_t *xctx)
 Convert internal dayTimeDuration to utf8 xml schema dayTimeDuration in specified pool. More...
 
void afw_dayTimeDuration_utf8_set_internal (const afw_utf8_t *utf8, afw_dayTimeDuration_t *internal, afw_xctx_t *xctx)
 Convert utf8 xml schema dayTimeDuration to internal and set. More...
 
const afw_utf8_tafw_time_internal_to_utf8 (const afw_time_t *time, const afw_pool_t *p, afw_xctx_t *xctx)
 Convert internal time to utf8 xml schema time in specified pool. More...
 
void afw_time_utf8_set_internal (const afw_utf8_t *utf8, afw_time_t *internal, afw_xctx_t *xctx)
 Convert utf8 xml schema dateTime to internal and set. More...
 
const afw_utf8_tafw_yearMonthDuration_internal_to_utf8 (const afw_yearMonthDuration_t *yearMonthDuration, const afw_pool_t *p, afw_xctx_t *xctx)
 Convert internal yearMonthDuration to utf8 xml schema yearMonthDuration in specified pool. More...
 
void afw_yearMonthDuration_utf8_set_internal (const afw_utf8_t *utf8, afw_yearMonthDuration_t *internal, afw_xctx_t *xctx)
 Convert utf8 xml schema yearMonthDuration to internal and set. More...
 
int afw_date_compare (const afw_date_t *v1, const afw_date_t *v2, afw_xctx_t *xctx)
 compare two date values. More...
 
int afw_dateTime_compare (const afw_dateTime_t *v1, const afw_dateTime_t *v2, afw_xctx_t *xctx)
 compare two dateTime values. More...
 
int afw_time_compare (const afw_time_t *v1, const afw_time_t *v2, afw_xctx_t *xctx)
 compare two time values. More...
 
int afw_dayTimeDuration_compare (const afw_dayTimeDuration_t *v1, const afw_dayTimeDuration_t *v2, afw_xctx_t *xctx)
 compare two dateTime values. More...
 
int afw_yearMonthDuration_compare (const afw_yearMonthDuration_t *v1, const afw_yearMonthDuration_t *v2, afw_xctx_t *xctx)
 compare two yearMonthDuration values. More...
 
void afw_date_add_yearMonthDuration (afw_date_t *date, const afw_yearMonthDuration_t *yearMonthDuration, afw_xctx_t *xctx)
 Add yearMonthDuration to date. More...
 
void afw_date_subtract_yearMonthDuration (afw_date_t *date, const afw_yearMonthDuration_t *yearMonthDuration, afw_xctx_t *xctx)
 Subtract yearMonthDuration from date. More...
 
void afw_dateTime_add_dayTimeDuration (afw_dateTime_t *dateTime, const afw_dayTimeDuration_t *dayTimeDuration, afw_xctx_t *xctx)
 Add dayTimeDuration to dateTime. More...
 
void afw_dateTime_subtract_dayTimeDuration (afw_dateTime_t *dateTime, const afw_dayTimeDuration_t *dayTimeDuration, afw_xctx_t *xctx)
 Subtract dayTimeDuration from dateTime. More...
 
void afw_dateTime_add_yearMonthDuration (afw_dateTime_t *dateTime, const afw_yearMonthDuration_t *yearMonthDuration, afw_xctx_t *xctx)
 Add yearMonthDuration to dateTime. More...
 
void afw_dateTime_subtract_yearMonthDuration (afw_dateTime_t *dateTime, const afw_yearMonthDuration_t *yearMonthDuration, afw_xctx_t *xctx)
 Subtract yearMonthDuration from dateTime. More...
 
const afw_utf8_tafw_dateType_internal_to_generalized_time (const afw_dateTime_t *dateTime, const afw_pool_t *p, afw_xctx_t *xctx)
 Convert internal dateTime to generalized time (see X.208) in specified pool. More...
 
void afw_dataType_generalized_time_set_internal (const afw_utf8_t *generalized_time, afw_dateTime_t *internal, afw_xctx_t *xctx)
 Convert generalized time (see X.208) to internal and set. More...
 

Detailed Description

Header for Adaptive Framework Time Support.

Definition in file afw_time.h.