DateParameter.cpp 2.0 KB

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