84 for (pos = dtfrom; pos < from; pos++) {
115 for (carry = 0, pos = dt->
to; carry == 0 && pos > to; pos--) {
141 make_incr(&incr, to, to, dt);
161 for (pos = dt->
to; pos > to; pos--) {
162 make_incr(&incr, pos, pos, dt);
166 incr.
day = dt->
day + ndays / 2;
179 for (pos = from; pos < dtfrom; pos++)
201 for (pos = to; pos > dt->
to; pos--)
int datetime_change_from_to(DateTime *dt, int from, int to, int round)
Changes the from/to of the type for dt. The 'from/to' must be legal values for the mode of dt; (if th...
#define DATETIME_RELATIVE
int datetime_is_negative(const DateTime *dt)
Returns: 1 if the DateTime is negative 0 otherwise.
void datetime_set_negative(DateTime *dt)
Makes the DateTime negative. (B.C. for ABSOLUTE DateTimes)
int datetime_is_valid_type(const DateTime *dt)
Returns: 1 if datetime_check_type() returns 0 0 if not.
int datetime_is_absolute(const DateTime *dt)
Returns: 1 if dt.mode is absolute 0 if not (even if dt.mode is not defined)
int datetime_set_type(DateTime *dt, int mode, int from, int to, int fracsec)
int datetime_is_relative(const DateTime *dt)
Returns: 1 if dt.mode is relative 0 if not (even if dt.mode is not defined)
int datetime_increment(DateTime *src, DateTime *incr)
This function changes the 'src' date/time data based on the 'incr' The type (mode/from/to) of the 'sr...
int datetime_days_in_year(int year, int ad)
returns the number of days in 'year'