calendar.h 1.1 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344
  1. // -*- C++ -*-
  2. //===----------------------------------------------------------------------===//
  3. //
  4. // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
  5. // See https://llvm.org/LICENSE.txt for license information.
  6. // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
  7. //
  8. //===----------------------------------------------------------------------===//
  9. #ifndef _LIBCPP___CHRONO_CALENDAR_H
  10. #define _LIBCPP___CHRONO_CALENDAR_H
  11. #include <__chrono/duration.h>
  12. #include <__chrono/time_point.h>
  13. #include <__config>
  14. #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
  15. # pragma GCC system_header
  16. #endif
  17. #if _LIBCPP_STD_VER >= 20
  18. _LIBCPP_BEGIN_NAMESPACE_STD
  19. namespace chrono
  20. {
  21. struct local_t {};
  22. template<class _Duration>
  23. using local_time = time_point<local_t, _Duration>;
  24. using local_seconds = local_time<seconds>;
  25. using local_days = local_time<days>;
  26. struct last_spec { explicit last_spec() = default; };
  27. inline constexpr last_spec last{};
  28. } // namespace chrono
  29. _LIBCPP_END_NAMESPACE_STD
  30. #endif // _LIBCPP_STD_VER >= 20
  31. #endif // _LIBCPP___CHRONO_CALENDAR_H