days.hpp 667 B

1234567891011121314151617181920212223242526
  1. //
  2. // Copyright (c) 2019-2024 Ruben Perez Hidalgo (rubenperez038 at gmail dot com)
  3. //
  4. // Distributed under the Boost Software License, Version 1.0. (See accompanying
  5. // file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt)
  6. //
  7. #ifndef BOOST_MYSQL_DAYS_HPP
  8. #define BOOST_MYSQL_DAYS_HPP
  9. #include <chrono>
  10. namespace boost {
  11. namespace mysql {
  12. /**
  13. * \brief Duration representing a day (24 hours).
  14. * \details Suitable to represent the range of dates MySQL offers.
  15. * May differ in representation from `std::chrono::days` in C++20.
  16. */
  17. using days = std::chrono::duration<int, std::ratio<3600 * 24>>;
  18. } // namespace mysql
  19. } // namespace boost
  20. #endif