php-internal-docs 8.4.8
Unofficial docs for php/php-src
|
Go to the source code of this file.
Functions | |
timelib_rel_time * | timelib_diff (timelib_time *one, timelib_time *two) |
int | timelib_diff_days (timelib_time *one, timelib_time *two) |
timelib_time * | timelib_add (timelib_time *old_time, timelib_rel_time *interval) |
timelib_time * | timelib_sub (timelib_time *old_time, timelib_rel_time *interval) |
timelib_time * | timelib_add_wall (timelib_time *old_time, timelib_rel_time *interval) |
timelib_time * | timelib_sub_wall (timelib_time *old_time, timelib_rel_time *interval) |
timelib_time * timelib_add | ( | timelib_time * | t, |
timelib_rel_time * | interval ) |
Adds the relative time information 'interval' to the base time 't'.
This can be a relative time as created by 'timelib_diff', but also by more complex statements such as "next workday".
Definition at line 211 of file interval.c.
timelib_time * timelib_add_wall | ( | timelib_time * | old_time, |
timelib_rel_time * | interval ) |
Definition at line 284 of file interval.c.
timelib_rel_time * timelib_diff | ( | timelib_time * | one, |
timelib_time * | two ) |
Calculates the difference between two times
The result is a timelib_rel_time structure that describes how you can convert from 'one' to 'two' with 'timelib_add'. This does not necessarily mean that you can go from 'two' to 'one' by using 'timelib_sub' due to the way months and days are calculated.
Definition at line 146 of file interval.c.
int timelib_diff_days | ( | timelib_time * | one, |
timelib_time * | two ) |
Calculates the difference in full days between two times
The result is the number of full days between 'one' and 'two'. It does take into account 23 and 25 hour (and variants) days when the zone_type is TIMELIB_ZONETYPE_ID and have the same TZID for 'one' and 'two'.
Definition at line 181 of file interval.c.
timelib_time * timelib_sub | ( | timelib_time * | t, |
timelib_rel_time * | interval ) |
Subtracts the relative time information 'interval' to the base time 't'.
This can be a relative time as created by 'timelib_diff'. Unlike with 'timelib_add', this does not support more complex statements such as "next workday".
Definition at line 242 of file interval.c.
timelib_time * timelib_sub_wall | ( | timelib_time * | old_time, |
timelib_rel_time * | interval ) |
Definition at line 338 of file interval.c.