|
GRASS 8 Programmer's Manual 8.6.0dev(2026)-56a9afeb9f
|
#include <grass/datetime.h>
Go to the source code of this file.
Functions | |
| 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' | |
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 53 of file change.c.
References DATETIME_DAY, datetime_days_in_year(), DATETIME_HOUR, datetime_increment(), datetime_is_absolute(), datetime_is_valid_type(), DATETIME_MINUTE, DATETIME_MONTH, DATETIME_SECOND, datetime_set_type(), DATETIME_YEAR, DateTime::day, DateTime::fracsec, DateTime::from, DateTime::hour, DateTime::minute, DateTime::mode, DateTime::month, DateTime::positive, DateTime::second, DateTime::to, x, and DateTime::year.
Referenced by datetime_difference(), datetime_get_local_timezone(), and datetime_increment().