php-internal-docs 8.4.8
Unofficial docs for php/php-src
|
Go to the source code of this file.
Macros | |
#define | TIMELIB_LLABS(y) |
#define | timelib_tolower(c) |
#define | MAX(a, b) |
#define | MIN(a, b) |
Variables | |
const char * | timelib_error_messages [10] |
#define timelib_tolower | ( | c | ) |
timelib_long timelib_date_to_int | ( | timelib_time * | d, |
int * | error ) |
Converts the 'sse' value of 'd' to a timelib_long type.
If the value fits in the TIMELIB_LONG_MIN and TIMELIB_LONG_MAX range, the value is cast to (timelib_long) and returned. If *error is not a NULL pointer, it will be set to 0.
If the value does not fit in the range, the function returns 0 and if *error is not a NULL pointer, it will be set to 1.
timelib_long is a 32 bit signed long integer on 32 bit platforms, and a 64 bit signed long long integer on 64 bit platforms. In other words, it makes sure that the value in 'sse' (which is always a signed long long 64 bit integer) can be used safely outside of the library.
void timelib_decimal_hour_to_hms | ( | double | h, |
int * | hour, | ||
int * | min, | ||
int * | sec ) |
void timelib_dump_date | ( | timelib_time * | d, |
int | options ) |
void timelib_dump_rel_time | ( | timelib_rel_time * | d | ) |
void timelib_error_container_dtor | ( | timelib_error_container * | errors | ) |
Frees up the resources allocated while converting strings to timelib_time structures with the timelib_strtotime and timelib_strtointerval functions.
const char * timelib_get_error_message | ( | int | error_code | ) |
char * timelib_get_tz_abbr_ptr | ( | timelib_time * | t | ) |
void timelib_hms_to_decimal_hour | ( | int | hour, |
int | min, | ||
int | sec, | ||
double * | h ) |
timelib_sll timelib_hms_to_seconds | ( | timelib_sll | h, |
timelib_sll | m, | ||
timelib_sll | s ) |
void timelib_hmsf_to_decimal_hour | ( | int | hour, |
int | min, | ||
int | sec, | ||
int | us, | ||
double * | h ) |
timelib_rel_time * timelib_rel_time_clone | ( | timelib_rel_time * | tz | ) |
Creates a new timelib_rel_time resource and copies over the information from 'tz'.
Must be freed with 'timelib_rel_time_dtor'.
timelib_rel_time * timelib_rel_time_ctor | ( | void | ) |
void timelib_rel_time_dtor | ( | timelib_rel_time * | t | ) |
int timelib_strcasecmp | ( | const char * | s1, |
const char * | s2 ) |
int timelib_strncasecmp | ( | const char * | s1, |
const char * | s2, | ||
size_t | length ) |
timelib_time * timelib_time_clone | ( | timelib_time * | orig | ) |
Creates a new timelib_time resource and copies over the information from 'orig'.
Must be freed with 'timelib_time_dtor'.
int timelib_time_compare | ( | timelib_time * | t1, |
timelib_time * | t2 ) |
Compares two timelib_time structures and returns which one is earlier in time.
To decide which comes earlier it uses the 'sse' (Seconds Since Epoch) and 'us' (microseconds) fields.
Returns -1 if t1 < t2, 0 if t1 == t2, and -1 if t1 > t2.
timelib_time * timelib_time_ctor | ( | void | ) |
void timelib_time_dtor | ( | timelib_time * | t | ) |
timelib_time_offset * timelib_time_offset_ctor | ( | void | ) |
void timelib_time_offset_dtor | ( | timelib_time_offset * | t | ) |
void timelib_time_tz_abbr_update | ( | timelib_time * | tm, |
const char * | tz_abbr ) |
const char* timelib_error_messages[10] |