DateParameterMapper.hpp 986 B

123456789101112131415161718192021222324252627282930313233343536373839404142
  1. /*
  2. * Author: Patrick-Christopher Mattulat
  3. * Company: Lynar Studios
  4. * E-Mail: webmaster@lynarstudios.com
  5. * Created: 2023-03-31
  6. * Changed: 2024-05-25
  7. *
  8. * */
  9. #ifndef LS_STD_DATE_PARAMETER_MAPPER_HPP
  10. #define LS_STD_DATE_PARAMETER_MAPPER_HPP
  11. #include "DateParameter.hpp"
  12. #include <ls-std/os/dynamic-goal.hpp>
  13. #include <ls-std/time/type/DateParameterTypes.hpp>
  14. #ifdef _WIN32
  15. #include <windows.h>
  16. #endif
  17. /*
  18. * @class(name: 'DateParameterMapper', package: 'time')
  19. * */
  20. namespace ls::std::time
  21. {
  22. class LS_STD_DYNAMIC_GOAL DateParameterMapper
  23. {
  24. public:
  25. DateParameterMapper();
  26. ~DateParameterMapper();
  27. #if defined(unix) || defined(__APPLE__)
  28. [[nodiscard]] static ls::std::time::type::UnixTimestamp toUnixTimestamp(const ls::std::time::DateParameter &_dateParameter);
  29. #endif
  30. #ifdef _WIN32
  31. [[nodiscard]] static SYSTEMTIME toWindowsSystemTime(const ls::std::time::DateParameter &_dateParameter);
  32. #endif
  33. };
  34. }
  35. #endif