GRASS GIS 7 Programmer's Manual
7.9.dev(2021)-e5379bbd7
|
Go to the source code of this file.
Functions | |
int | datetime_is_between (int x, int a, int b) |
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 they are not legal, then the original values are preserved, dt is not changed). Returns: 0 OK -1 invalid 'dt' -2 invalid 'from/to' More... | |
void | datetime_copy (DateTime *src, const DateTime *dst) |
Copies the DateTime [into/from ???] src. More... | |
int | datetime_difference (const DateTime *a, const DateTime *b, DateTime *result) |
This performs the formula: result = a - b;. More... | |
int | datetime_error (int code, char *msg) |
record 'code' and 'msg' as error code/msg (in static variables) code==0 will clear the error (ie set msg=NULL) returns 'code' so that it can be used like: More... | |
int | datetime_error_code (void) |
returns an error code More... | |
char * | datetime_error_msg (void) |
returns an error message More... | |
void | datetime_clear_error (void) |
clears error code and message More... | |
int | datetime_format (const DateTime *dt, char *buf) |
formats DateTime structure as a human-readable string returns 0 when successful and 'buf' is filled with the string returns a negative number on error More... | |
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 'src' can be anything. The mode of the 'incr' must be RELATIVE, and the type (mode/from/to) for 'incr' must be a valid increment for 'src'. See datetime_is_valid_increment(), datetime_check_increment() Returns: 0: OK -1: 'incr' is invalid increment for 'src' For src.mode ABSOLUTE,. More... | |
int | datetime_is_valid_increment (const DateTime *src, const DateTime *incr) |
Returns: datetime_check_increment(src, incr) == 0. More... | |
int | datetime_check_increment (const DateTime *src, const DateTime *incr) |
This checks if the type of 'incr' is valid for incrementing/decrementing 'src'. The type (mode/from/to) of the 'src' can be anything. The incr.mode must be RELATIVE A timezone in 'src' is allowed - it's presence is ignored. To aid in setting the 'incr' type, see datetime_get_increment_type(). Returns: More... | |
int | datetime_get_increment_type (const DateTime *dt, int *mode, int *from, int *to, int *fracsec) |
This returns the components of a type (mode/from/to/fracsec) that can be used to construct a DateTime object that can be used to increment the 'src'. Also see datetime_set_increment_type(). returns: 0 dt is legal !=0 why dt is illegal Implemented as follows: More... | |
int | datetime_set_increment_type (const DateTime *src, DateTime *incr) |
src must be legal This is a convenience routine which is implemented as follows: More... | |
int | datetime_get_local_timezone (int *minutes) |
Returns: 0 OK -1 local timezone info not available. More... | |
void | datetime_get_local_time (DateTime *dt) |
set mode/from/to ABSOLUTE/YEAR/SECOND set the local time into 'dt' does not set timezone. More... | |
int | datetime_days_in_month (int year, int month, int ad) |
returns number of days in 'month' of a particular 'year' More... | |
int | datetime_is_leap_year (int year, int ad) |
int | datetime_days_in_year (int year, int ad) |
returns the number of days in 'year' More... | |
int | datetime_is_same (const DateTime *src, const DateTime *dst) |
Returns: 1 if 'src' is exactly the same as 'dst' 0 if they differ. More... | |
int | datetime_scan (DateTime *dt, const char *buf) |
Convert the ascii string into a DateTime. This determines the mode/from/to based on the string, inits 'dt' and then sets values in 'dt' based on the [???] Returns 0 if 'string' is legal, -1 if not. More... | |
int | datetime_is_positive (const DateTime *dt) |
Returns: 1 if the Datetime is positive 0 otherwise. More... | |
int | datetime_is_negative (const DateTime *dt) |
Returns: 1 if the DateTime is negative 0 otherwise. More... | |
void | datetime_set_positive (DateTime *dt) |
Makes the DateTime positive. (A.D. for ABSOLUTE DateTimes) More... | |
void | datetime_set_negative (DateTime *dt) |
Makes the DateTime negative. (B.C. for ABSOLUTE DateTimes) More... | |
void | datetime_invert_sign (DateTime *dt) |
int | datetime_set_type (DateTime *dt, int mode, int from, int to, int fracsec) |
int | datetime_get_type (const DateTime *dt, int *mode, int *from, int *to, int *fracsec) |
int | datetime_is_valid_type (const DateTime *dt) |
Returns: 1 if datetime_check_type() returns 0 0 if not. More... | |
int | datetime_check_type (const DateTime *dt) |
checks the mode/from/to/fracsec in dt. Returns: More... | |
int | datetime_in_interval_year_month (int x) |
int | datetime_in_interval_day_second (int x) |
int | datetime_is_absolute (const DateTime *dt) |
Returns: 1 if dt.mode is absolute 0 if not (even if dt.mode is not defined) More... | |
int | datetime_is_relative (const DateTime *dt) |
Returns: 1 if dt.mode is relative 0 if not (even if dt.mode is not defined) More... | |
int | datetime_check_timezone (const DateTime *dt, int minutes) |
returns 0 on success More... | |
int | datetime_get_timezone (const DateTime *dt, int *minutes) |
returns 0 on success More... | |
int | datetime_set_timezone (DateTime *dt, int minutes) |
returns 0 on success More... | |
int | datetime_unset_timezone (DateTime *dt) |
unsets timezone in 'dt' returns 0 More... | |
int | datetime_is_valid_timezone (int minutes) |
Returns: 1 OK: -720 <= minutes <= 780 (720 = 12 hours; 780 = 13 hours) 0 NOT OK. More... | |
int | datetime_change_timezone (DateTime *dt, int minutes) |
if dt has a timezone, increment dt by minutes-dt.tz MINUTES and set dt.tz = minutes Returns: 0 OK datetime_check_timezone (dt) if not -4 if minutes invalid More... | |
int | datetime_change_to_utc (DateTime *dt) |
Return datetime_change_timezone (dt, 0);. More... | |
void | datetime_decompose_timezone (int tz, int *hours, int *minutes) |
tz = abs(tz) *hour = tz/60 *minute = tz%60 Note: hour,minute are non-negative. Must look at sign of tz itself to see if the tz is negative offset or not. This routine would be used to format tz for output. For example if tz=-350 this would be hour=5 minute=50, but negative. Output might encode this as -0550: printf ("%s%02d%02d", tz<0?"-":"", hour, minute) More... | |
int | datetime_check_year (const DateTime *dt, int year) |
Returns: 0 is legal year for dt -1 illegal year for this dt -2 dt has no year component. More... | |
int | datetime_check_month (const DateTime *dt, int month) |
Returns: 0 is legal month for dt -1 illegal month for this dt -2 dt has no month component. More... | |
int | datetime_check_day (const DateTime *dt, int day) |
Returns: 0 is legal day for dt -1 illegal day for this dt -2 dt has no day component Note: if dt.mode is ABSOLUTE, then dt.year and dt.month must also be legal, since the 'day' must be a legal value for the dt.year/dt.month. More... | |
int | datetime_check_hour (const DateTime *dt, int hour) |
returns: 0 on success -1 if 'dt' has an invalid hour -2 if 'dt' has no hour More... | |
int | datetime_check_minute (const DateTime *dt, int minute) |
returns: 0 on success -1 if 'dt' has an invalid minute -2 if 'dt' has no minute More... | |
int | datetime_check_second (const DateTime *dt, double second) |
returns: 0 on success -1 if 'dt' has an invalid second -2 if 'dt' has no second More... | |
int | datetime_check_fracsec (const DateTime *dt, int fracsec) |
returns: 0 on success -1 if 'dt' has an invalid fracsec -2 if 'dt' has no fracsec More... | |
int | datetime_get_year (const DateTime *dt, int *year) |
returns 0 on success or negative value on error More... | |
int | datetime_set_year (DateTime *dt, int year) |
if dt.mode = ABSOLUTE, this also sets dt.day = 0 More... | |
int | datetime_get_month (const DateTime *dt, int *month) |
returns 0 on success or negative value on error More... | |
int | datetime_set_month (DateTime *dt, int month) |
if dt.mode = ABSOLUTE, this also sets dt.day = 0 More... | |
int | datetime_get_day (const DateTime *dt, int *day) |
returns 0 on success or negative value on error More... | |
int | datetime_set_day (DateTime *dt, int day) |
if dt.mode = ABSOLUTE, then the dt.year, dt.month: More... | |
int | datetime_get_hour (const DateTime *dt, int *hour) |
returns 0 on success or negative value on error More... | |
int | datetime_set_hour (DateTime *dt, int hour) |
returns 0 on success or negative value on error More... | |
int | datetime_get_minute (const DateTime *dt, int *minute) |
returns 0 on success or negative value on error More... | |
int | datetime_set_minute (DateTime *dt, int minute) |
returns 0 on success or negative value on error More... | |
int | datetime_get_second (const DateTime *dt, double *second) |
returns 0 on success or negative value on error More... | |
int | datetime_set_second (DateTime *dt, double second) |
returns 0 on success or negative value on error More... | |
int | datetime_get_fracsec (const DateTime *dt, int *fracsec) |
returns 0 on success or negative value on error More... | |
int | datetime_set_fracsec (DateTime *dt, int fracsec) |
returns 0 on success or negative value on error More... | |
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 they are not legal, then the original values are preserved, dt is not changed). Returns: 0 OK -1 invalid 'dt' -2 invalid 'from/to'
dt | |
from | |
to | |
round |
Definition at line 55 of file change.c.
Referenced by datetime_get_local_timezone().
int datetime_change_timezone | ( | DateTime * | dt, |
int | minutes | ||
) |
if dt has a timezone, increment dt by minutes-dt.tz MINUTES and set dt.tz = minutes Returns: 0 OK datetime_check_timezone (dt) if not -4 if minutes invalid
dt | |
minutes |
Definition at line 24 of file tz2.c.
References datetime_error(), datetime_get_timezone(), datetime_increment(), datetime_invert_sign(), datetime_is_valid_timezone(), DATETIME_MINUTE, DATETIME_RELATIVE, datetime_set_minute(), and datetime_set_type().
Referenced by datetime_change_to_utc().
int datetime_change_to_utc | ( | DateTime * | dt | ) |
Return datetime_change_timezone (dt, 0);.
dt |
Definition at line 63 of file tz2.c.
References datetime_change_timezone().
int datetime_check_day | ( | const DateTime * | dt, |
int | day | ||
) |
Returns: 0 is legal day for dt -1 illegal day for this dt -2 dt has no day component
Note: if dt.mode is ABSOLUTE, then dt.year and dt.month must also be legal, since the 'day' must be a legal value for the dt.year/dt.month.
dt | |
day |
Definition at line 91 of file values.c.
Referenced by datetime_get_day(), and datetime_set_day().
int datetime_check_fracsec | ( | const DateTime * | dt, |
int | fracsec | ||
) |
returns: 0 on success -1 if 'dt' has an invalid fracsec -2 if 'dt' has no fracsec
dt | |
fracsec |
Definition at line 207 of file values.c.
Referenced by datetime_get_fracsec(), and datetime_set_fracsec().
int datetime_check_hour | ( | const DateTime * | dt, |
int | hour | ||
) |
returns: 0 on success -1 if 'dt' has an invalid hour -2 if 'dt' has no hour
dt | |
hour |
Definition at line 129 of file values.c.
Referenced by datetime_get_hour(), and datetime_set_hour().
This checks if the type of 'incr' is valid for incrementing/decrementing 'src'. The type (mode/from/to) of the 'src' can be anything. The incr.mode must be RELATIVE A timezone in 'src' is allowed - it's presence is ignored. To aid in setting the 'incr' type, see datetime_get_increment_type(). Returns:
src | |
incr |
int datetime_check_minute | ( | const DateTime * | dt, |
int | minute | ||
) |
returns: 0 on success -1 if 'dt' has an invalid minute -2 if 'dt' has no minute
dt | |
minute |
Definition at line 155 of file values.c.
Referenced by datetime_get_minute(), and datetime_set_minute().
int datetime_check_month | ( | const DateTime * | dt, |
int | month | ||
) |
Returns: 0 is legal month for dt -1 illegal month for this dt -2 dt has no month component.
dt | |
month |
Definition at line 55 of file values.c.
Referenced by datetime_get_month(), and datetime_set_month().
int datetime_check_second | ( | const DateTime * | dt, |
double | second | ||
) |
int datetime_check_timezone | ( | const DateTime * | dt, |
int | minutes | ||
) |
returns 0 on success
dt | |
minutes |
Definition at line 26 of file tz1.c.
References datetime_error(), and datetime_is_absolute().
Referenced by datetime_get_timezone(), and datetime_set_timezone().
int datetime_check_type | ( | const DateTime * | dt | ) |
checks the mode/from/to/fracsec in dt. Returns:
dt |
Definition at line 116 of file datetime/type.c.
References DATETIME_ABSOLUTE, datetime_error(), datetime_in_interval_day_second(), datetime_in_interval_year_month(), datetime_is_between(), DATETIME_RELATIVE, DATETIME_SECOND, DATETIME_YEAR, DateTime::fracsec, DateTime::from, DateTime::mode, and DateTime::to.
Referenced by datetime_is_valid_type().
int datetime_check_year | ( | const DateTime * | dt, |
int | year | ||
) |
Returns: 0 is legal year for dt -1 illegal year for this dt -2 dt has no year component.
dt | |
year |
Definition at line 29 of file values.c.
Referenced by datetime_get_year(), and datetime_set_year().
void datetime_clear_error | ( | void | ) |
Copies the DateTime [into/from ???] src.
dst | |
src |
Definition at line 20 of file datetime/copy.c.
int datetime_days_in_month | ( | int | year, |
int | month, | ||
int | ad | ||
) |
returns number of days in 'month' of a particular 'year'
month | |
year | |
ad |
Definition at line 64 of file datetime/misc.c.
References datetime_error(), and datetime_is_leap_year().
int datetime_days_in_year | ( | int | year, |
int | ad | ||
) |
returns the number of days in 'year'
year | |
ad |
Definition at line 41 of file datetime/misc.c.
References datetime_error(), and datetime_is_leap_year().
void datetime_decompose_timezone | ( | int | tz, |
int * | hours, | ||
int * | minutes | ||
) |
tz = abs(tz) *hour = tz/60 *minute = tz%60 Note: hour,minute are non-negative. Must look at sign of tz itself to see if the tz is negative offset or not. This routine would be used to format tz for output. For example if tz=-350 this would be hour=5 minute=50, but negative. Output might encode this as -0550: printf ("%s%02d%02d", tz<0?"-":"", hour, minute)
tz | |
hours | |
minutes |
This performs the formula: result = a - b;.
a | |
b | |
result |
Definition at line 81 of file diff.c.
Referenced by datetime_get_local_timezone().
int datetime_error | ( | int | code, |
char * | msg | ||
) |
record 'code' and 'msg' as error code/msg (in static variables) code==0 will clear the error (ie set msg=NULL) returns 'code' so that it can be used like:
code | |
msg |
Definition at line 30 of file datetime/error.c.
Referenced by datetime_change_timezone(), datetime_check_timezone(), datetime_check_type(), datetime_days_in_month(), datetime_days_in_year(), and datetime_is_leap_year().
int datetime_error_code | ( | void | ) |
returns an error code
Definition at line 48 of file datetime/error.c.
Referenced by datetime_format().
char* datetime_error_msg | ( | void | ) |
int datetime_format | ( | const DateTime * | dt, |
char * | buf | ||
) |
formats DateTime structure as a human-readable string returns 0 when successful and 'buf' is filled with the string returns a negative number on error
dt | |
buf |
Definition at line 28 of file datetime/format.c.
References datetime_error_code(), datetime_get_day(), datetime_get_month(), datetime_is_absolute(), and datetime_is_valid_type().
int datetime_get_day | ( | const DateTime * | dt, |
int * | day | ||
) |
returns 0 on success or negative value on error
dt | |
day |
Definition at line 325 of file values.c.
References datetime_check_day(), and DateTime::day.
Referenced by datetime_format().
int datetime_get_fracsec | ( | const DateTime * | dt, |
int * | fracsec | ||
) |
returns 0 on success or negative value on error
dt | |
fracsec |
Definition at line 508 of file values.c.
References datetime_check_fracsec(), and DateTime::fracsec.
int datetime_get_hour | ( | const DateTime * | dt, |
int * | hour | ||
) |
returns 0 on success or negative value on error
dt | |
hour |
Definition at line 376 of file values.c.
References datetime_check_hour(), and DateTime::hour.
int datetime_get_increment_type | ( | const DateTime * | dt, |
int * | mode, | ||
int * | from, | ||
int * | to, | ||
int * | fracsec | ||
) |
This returns the components of a type (mode/from/to/fracsec) that can be used to construct a DateTime object that can be used to increment the 'src'. Also see datetime_set_increment_type(). returns: 0 dt is legal !=0 why dt is illegal Implemented as follows:
dt | |
mode | |
from | |
to | |
fracsec |
void datetime_get_local_time | ( | DateTime * | dt | ) |
set mode/from/to ABSOLUTE/YEAR/SECOND set the local time into 'dt' does not set timezone.
dt |
Definition at line 87 of file local.c.
References DATETIME_ABSOLUTE, DATETIME_SECOND, datetime_set_day(), datetime_set_hour(), datetime_set_minute(), datetime_set_month(), datetime_set_second(), datetime_set_type(), datetime_set_year(), DATETIME_YEAR, and localtime().
int datetime_get_local_timezone | ( | int * | minutes | ) |
Returns: 0 OK -1 local timezone info not available.
minutes |
Definition at line 33 of file local.c.
References DATETIME_ABSOLUTE, datetime_change_from_to(), DATETIME_DAY, datetime_difference(), DATETIME_MINUTE, DATETIME_RELATIVE, DATETIME_SECOND, datetime_set_day(), datetime_set_hour(), datetime_set_minute(), datetime_set_month(), datetime_set_second(), datetime_set_type(), datetime_set_year(), DATETIME_YEAR, gmtime(), localtime(), DateTime::minute, and DateTime::positive.
int datetime_get_minute | ( | const DateTime * | dt, |
int * | minute | ||
) |
returns 0 on success or negative value on error
dt | |
minute |
Definition at line 420 of file values.c.
References datetime_check_minute(), and DateTime::minute.
int datetime_get_month | ( | const DateTime * | dt, |
int * | month | ||
) |
returns 0 on success or negative value on error
dt | |
month |
Definition at line 276 of file values.c.
References datetime_check_month(), and DateTime::month.
Referenced by datetime_format().
int datetime_get_second | ( | const DateTime * | dt, |
double * | second | ||
) |
int datetime_get_timezone | ( | const DateTime * | dt, |
int * | minutes | ||
) |
returns 0 on success
dt | |
minutes |
Definition at line 49 of file tz1.c.
References datetime_check_timezone(), and DateTime::tz.
Referenced by datetime_change_timezone().
int datetime_get_type | ( | const DateTime * | dt, |
int * | mode, | ||
int * | from, | ||
int * | to, | ||
int * | fracsec | ||
) |
Definition at line 58 of file datetime/type.c.
int datetime_get_year | ( | const DateTime * | dt, |
int * | year | ||
) |
returns 0 on success or negative value on error
dt | |
year |
Definition at line 227 of file values.c.
References datetime_check_year(), and DateTime::year.
int datetime_in_interval_day_second | ( | int | x | ) |
Definition at line 156 of file datetime/type.c.
References DATETIME_DAY, datetime_is_between(), and DATETIME_SECOND.
Referenced by datetime_check_type().
int datetime_in_interval_year_month | ( | int | x | ) |
Definition at line 151 of file datetime/type.c.
References datetime_is_between(), DATETIME_MONTH, and DATETIME_YEAR.
Referenced by datetime_check_type().
This function changes the 'src' date/time data based on the 'incr' The type (mode/from/to) of the 'src' can be anything. The mode of the 'incr' must be RELATIVE, and the type (mode/from/to) for 'incr' must be a valid increment for 'src'. See datetime_is_valid_increment(), datetime_check_increment() Returns: 0: OK -1: 'incr' is invalid increment for 'src' For src.mode ABSOLUTE,.
The 'fracsec' in 'src' is preserved. The 'from/to' of the 'src' is preserved. A timezone in 'src' is allowed - it's presence is ignored. NOTE: There is no datetime_decrement() To decrement, set the 'incr' negative.
src | |
incr |
Definition at line 67 of file incr1.c.
Referenced by datetime_change_timezone().
void datetime_invert_sign | ( | DateTime * | dt | ) |
dt |
Definition at line 80 of file sign.c.
References DateTime::positive.
Referenced by datetime_change_timezone().
int datetime_is_absolute | ( | const DateTime * | dt | ) |
Returns: 1 if dt.mode is absolute 0 if not (even if dt.mode is not defined)
dt |
Definition at line 173 of file datetime/type.c.
References DATETIME_ABSOLUTE, and DateTime::mode.
Referenced by datetime_check_timezone(), datetime_format(), datetime_set_month(), and datetime_set_year().
int datetime_is_between | ( | int | x, |
int | a, | ||
int | b | ||
) |
Definition at line 8 of file between.c.
Referenced by datetime_check_type(), datetime_in_interval_day_second(), and datetime_in_interval_year_month().
int datetime_is_leap_year | ( | int | year, |
int | ad | ||
) |
year | |
ad |
Definition at line 18 of file datetime/misc.c.
References datetime_error().
Referenced by datetime_days_in_month(), and datetime_days_in_year().
int datetime_is_negative | ( | const DateTime * | dt | ) |
Returns: 1 if the DateTime is negative 0 otherwise.
dt |
Definition at line 37 of file sign.c.
References DateTime::positive.
int datetime_is_positive | ( | const DateTime * | dt | ) |
Returns: 1 if the Datetime is positive 0 otherwise.
dt |
Definition at line 21 of file sign.c.
References DateTime::positive.
int datetime_is_relative | ( | const DateTime * | dt | ) |
Returns: 1 if dt.mode is relative 0 if not (even if dt.mode is not defined)
dt |
Definition at line 190 of file datetime/type.c.
References DATETIME_RELATIVE, and DateTime::mode.
int datetime_is_valid_timezone | ( | int | minutes | ) |
Returns: 1 OK: -720 <= minutes <= 780 (720 = 12 hours; 780 = 13 hours) 0 NOT OK.
minutes |
Definition at line 111 of file tz1.c.
Referenced by datetime_change_timezone().
int datetime_is_valid_type | ( | const DateTime * | dt | ) |
Returns: 1 if datetime_check_type() returns 0 0 if not.
dt |
Definition at line 80 of file datetime/type.c.
References datetime_check_type().
Referenced by datetime_format().
int datetime_scan | ( | DateTime * | dt, |
const char * | buf | ||
) |
int datetime_set_day | ( | DateTime * | dt, |
int | day | ||
) |
if dt.mode = ABSOLUTE, then the dt.year, dt.month:
This implies that year/month must be set for ABSOLUTE datetimes.
Returns 0 on success or negative value on error
dt | |
day |
Definition at line 354 of file values.c.
References datetime_check_day(), and DateTime::day.
Referenced by datetime_get_local_time(), and datetime_get_local_timezone().
int datetime_set_fracsec | ( | DateTime * | dt, |
int | fracsec | ||
) |
returns 0 on success or negative value on error
dt | |
fracsec |
Definition at line 530 of file values.c.
References datetime_check_fracsec(), and DateTime::fracsec.
int datetime_set_hour | ( | DateTime * | dt, |
int | hour | ||
) |
returns 0 on success or negative value on error
dt | |
hour |
Definition at line 398 of file values.c.
References datetime_check_hour(), and DateTime::hour.
Referenced by datetime_get_local_time(), and datetime_get_local_timezone().
src must be legal This is a convenience routine which is implemented as follows:
Timezone Timezones are represented in minutes from GMT in the range [-720,+780]. For a DateTime to have a timezone, it must be of type ABSOLUTE, and "to" must be in {MINUTE,SECOND}.
src | |
incr |
int datetime_set_minute | ( | DateTime * | dt, |
int | minute | ||
) |
returns 0 on success or negative value on error
dt | |
minute |
Definition at line 442 of file values.c.
References datetime_check_minute(), and DateTime::minute.
Referenced by datetime_change_timezone(), datetime_get_local_time(), and datetime_get_local_timezone().
int datetime_set_month | ( | DateTime * | dt, |
int | month | ||
) |
if dt.mode = ABSOLUTE, this also sets dt.day = 0
returns 0 on success or negative value on error
dt | |
month |
Definition at line 300 of file values.c.
References datetime_check_month(), datetime_is_absolute(), DateTime::day, and DateTime::month.
Referenced by datetime_get_local_time(), and datetime_get_local_timezone().
void datetime_set_negative | ( | DateTime * | dt | ) |
Makes the DateTime negative. (B.C. for ABSOLUTE DateTimes)
dt |
Definition at line 67 of file sign.c.
References DateTime::positive.
void datetime_set_positive | ( | DateTime * | dt | ) |
Makes the DateTime positive. (A.D. for ABSOLUTE DateTimes)
dt |
Definition at line 52 of file sign.c.
References DateTime::positive.
int datetime_set_second | ( | DateTime * | dt, |
double | second | ||
) |
returns 0 on success or negative value on error
dt | |
second |
Definition at line 486 of file values.c.
Referenced by datetime_get_local_time(), and datetime_get_local_timezone().
int datetime_set_timezone | ( | DateTime * | dt, |
int | minutes | ||
) |
returns 0 on success
dt | |
minutes |
Definition at line 71 of file tz1.c.
References datetime_check_timezone(), and DateTime::tz.
int datetime_set_type | ( | DateTime * | dt, |
int | mode, | ||
int | from, | ||
int | to, | ||
int | fracsec | ||
) |
datetime_check_type
(dt) mode | |
from | |
to | |
fracsec |
Definition at line 37 of file datetime/type.c.
Referenced by datetime_change_timezone(), datetime_get_local_time(), and datetime_get_local_timezone().
int datetime_set_year | ( | DateTime * | dt, |
int | year | ||
) |
if dt.mode = ABSOLUTE, this also sets dt.day = 0
returns 0 on success or negative value on error
dt | |
year |
Definition at line 251 of file values.c.
References datetime_check_year(), datetime_is_absolute(), DateTime::day, and DateTime::year.
Referenced by datetime_get_local_time(), and datetime_get_local_timezone().
int datetime_unset_timezone | ( | DateTime * | dt | ) |
unsets timezone in 'dt' returns 0
dt |
Definition at line 92 of file tz1.c.
References DateTime::tz.