date.hpp 979 B

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364
  1. // Copyright (c) rAthena Dev Teams - Licensed under GNU GPL
  2. // For more information, see LICENCE in the main folder
  3. #ifndef DATE_HPP
  4. #define DATE_HPP
  5. #include "../common/cbasetypes.hpp"
  6. enum e_month{
  7. JANUARY = 1,
  8. FEBRUARY,
  9. MARCH,
  10. APRIL,
  11. MAY,
  12. JUNE,
  13. JULY,
  14. AUGUST,
  15. SEPTEMBER,
  16. OCTOBER,
  17. NOVEMBER,
  18. DECEMBER
  19. };
  20. enum e_dayofweek{
  21. SUNDAY = 0,
  22. MONDAY,
  23. TUESDAY,
  24. WEDNESDAY,
  25. THURSDAY,
  26. FRIDAY,
  27. SATURDAY
  28. };
  29. enum e_date_type{
  30. DT_MIN = 0,
  31. DT_SECOND,
  32. DT_MINUTE,
  33. DT_HOUR,
  34. DT_DAYOFWEEK,
  35. DT_DAYOFMONTH,
  36. DT_MONTH,
  37. DT_YEAR,
  38. DT_DAYOFYEAR,
  39. DT_YYYYMMDD,
  40. DT_MAX
  41. };
  42. int date_get_year(void);
  43. enum e_month date_get_month(void);
  44. int date_get_dayofmonth(void);
  45. enum e_dayofweek date_get_dayofweek(void);
  46. int date_get_dayofyear(void);
  47. int date_get_day(void);
  48. int date_get_hour(void);
  49. int date_get_min(void);
  50. int date_get_sec(void);
  51. int date_get( enum e_date_type type );
  52. bool is_day_of_sun(void);
  53. bool is_day_of_moon(void);
  54. bool is_day_of_star(void);
  55. #endif /* DATE_HPP */