datetime.h 769 B

123456789101112131415161718192021222324252627282930313233
  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 101 and increase
  6. * to make sure they do not interfere with the spatial
  7. * units in gis.h */
  8. #define DATETIME_YEAR 101
  9. #define DATETIME_MONTH 102
  10. #define DATETIME_DAY 103
  11. #define DATETIME_HOUR 104
  12. #define DATETIME_MINUTE 105
  13. #define DATETIME_SECOND 106
  14. typedef struct DateTime
  15. {
  16. int mode; /* absolute or relative */
  17. int from, to;
  18. int fracsec; /* #decimal place in printed seconds */
  19. int year, month, day;
  20. int hour, minute;
  21. double second;
  22. int positive;
  23. int tz; /* timezone - minutes from UTC */
  24. } DateTime;
  25. /* prototype of functions */
  26. #include <grass/defs/datetime.h>
  27. #endif