datetime.h 668 B

123456789101112131415161718192021222324252627282930
  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. int mode; /* absolute or relative */
  14. int from, to;
  15. int fracsec; /* #decimal place in printed seconds */
  16. int year, month, day;
  17. int hour, minute;
  18. double second;
  19. int positive;
  20. int tz; /* timezone - minutes from UTC */
  21. } DateTime ;
  22. /* prototype of functions */
  23. #include <grass/P_datetime.h>
  24. #endif