datetime.h 669 B

12345678910111213141516171819202122232425262728293031
  1. #ifndef GRASS_DATETIME_H
  2. #define GRASS_DATETIME_H
  3. #define DATETIME_ABSOLUTE 1
  4. #define DATETIME_RELATIVE 2
  5. /* ranges - the values must start at 1 and increase */
  6. #define DATETIME_YEAR 1
  7. #define DATETIME_MONTH 2
  8. #define DATETIME_DAY 3
  9. #define DATETIME_HOUR 4
  10. #define DATETIME_MINUTE 5
  11. #define DATETIME_SECOND 6
  12. typedef struct
  13. {
  14. int mode; /* absolute or relative */
  15. int from, to;
  16. int fracsec; /* #decimal place in printed seconds */
  17. int year, month, day;
  18. int hour, minute;
  19. double second;
  20. int positive;
  21. int tz; /* timezone - minutes from UTC */
  22. } DateTime;
  23. /* prototype of functions */
  24. #include <grass/P_datetime.h>
  25. #endif