DateParameter.cpp 1.9 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-03-29
  6. * Changed: 2023-05-17
  7. *
  8. * */
  9. #include <ls-std/time/common/DateParameter.hpp>
  10. using ls::std::time::DateParameter;
  11. using ls::std::time::type::Day;
  12. using ls::std::time::type::Hour;
  13. using ls::std::time::type::Minute;
  14. using ls::std::time::type::Month;
  15. using ls::std::time::type::Second;
  16. using ls::std::time::type::Year;
  17. DateParameter::DateParameter(Year _year, Month _month, Day _day, Hour _hour, Minute _minute, Second _second) : day(_day), hour(_hour), minute(_minute), month(_month), second(_second), year(_year)
  18. {}
  19. DateParameter::DateParameter() = default;
  20. DateParameter::~DateParameter() = default;
  21. bool DateParameter::operator==(const DateParameter &_dateParameter) const
  22. {
  23. return this->day == _dateParameter.getDay() && this->hour == _dateParameter.getHour() && this->minute == _dateParameter.getMinute() && this->month == _dateParameter.getMonth() && this->second == _dateParameter.getSecond() && this->year == _dateParameter.getYear();
  24. }
  25. Day DateParameter::getDay() const
  26. {
  27. return this->day;
  28. }
  29. Hour DateParameter::getHour() const
  30. {
  31. return this->hour;
  32. }
  33. Minute DateParameter::getMinute() const
  34. {
  35. return this->minute;
  36. }
  37. Month DateParameter::getMonth() const
  38. {
  39. return this->month;
  40. }
  41. Second DateParameter::getSecond() const
  42. {
  43. return this->second;
  44. }
  45. Year DateParameter::getYear() const
  46. {
  47. return this->year;
  48. }
  49. void DateParameter::setDay(Day _day)
  50. {
  51. this->day = _day;
  52. }
  53. void DateParameter::setHour(Hour _hour)
  54. {
  55. this->hour = _hour;
  56. }
  57. void DateParameter::setMinute(Minute _minute)
  58. {
  59. this->minute = _minute;
  60. }
  61. void DateParameter::setMonth(Month _month)
  62. {
  63. this->month = _month;
  64. }
  65. void DateParameter::setSecond(Second _second)
  66. {
  67. this->second = _second;
  68. }
  69. void DateParameter::setYear(Year _year)
  70. {
  71. this->year = _year;
  72. }