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. struct local_t {};
  21. template <class _Duration>
  22. using local_time = time_point<local_t, _Duration>;
  23. using local_seconds = local_time<seconds>;
  24. using local_days = local_time<days>;
  25. struct last_spec {
  26. explicit last_spec() = default;
  27. };
  28. inline constexpr last_spec last{};
  29. } // namespace chrono
  30. _LIBCPP_END_NAMESPACE_STD
  31. #endif // _LIBCPP_STD_VER >= 20
  32. #endif // _LIBCPP___CHRONO_CALENDAR_H