xref: /freebsd/contrib/llvm-project/libcxx/include/__chrono/calendar.h (revision cb14a3fe5122c879eae1fb480ed7ce82a699ddb6)
104eeddc0SDimitry Andric // -*- C++ -*-
204eeddc0SDimitry Andric //===----------------------------------------------------------------------===//
304eeddc0SDimitry Andric //
404eeddc0SDimitry Andric // Part of the LLVM Project, under the Apache License v2.0 with LLVM Exceptions.
504eeddc0SDimitry Andric // See https://llvm.org/LICENSE.txt for license information.
604eeddc0SDimitry Andric // SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception
704eeddc0SDimitry Andric //
804eeddc0SDimitry Andric //===----------------------------------------------------------------------===//
904eeddc0SDimitry Andric 
1004eeddc0SDimitry Andric #ifndef _LIBCPP___CHRONO_CALENDAR_H
1104eeddc0SDimitry Andric #define _LIBCPP___CHRONO_CALENDAR_H
1204eeddc0SDimitry Andric 
1304eeddc0SDimitry Andric #include <__chrono/duration.h>
1404eeddc0SDimitry Andric #include <__chrono/time_point.h>
1504eeddc0SDimitry Andric #include <__config>
1604eeddc0SDimitry Andric 
1704eeddc0SDimitry Andric #if !defined(_LIBCPP_HAS_NO_PRAGMA_SYSTEM_HEADER)
1804eeddc0SDimitry Andric #  pragma GCC system_header
1904eeddc0SDimitry Andric #endif
2004eeddc0SDimitry Andric 
2106c3fb27SDimitry Andric #if _LIBCPP_STD_VER >= 20
2204eeddc0SDimitry Andric 
2304eeddc0SDimitry Andric _LIBCPP_BEGIN_NAMESPACE_STD
2404eeddc0SDimitry Andric 
25*cb14a3feSDimitry Andric namespace chrono {
2604eeddc0SDimitry Andric 
2704eeddc0SDimitry Andric struct local_t {};
2806c3fb27SDimitry Andric template <class _Duration>
2906c3fb27SDimitry Andric using local_time    = time_point<local_t, _Duration>;
3004eeddc0SDimitry Andric using local_seconds = local_time<seconds>;
3104eeddc0SDimitry Andric using local_days    = local_time<days>;
3204eeddc0SDimitry Andric 
33*cb14a3feSDimitry Andric struct last_spec {
34*cb14a3feSDimitry Andric   explicit last_spec() = default;
35*cb14a3feSDimitry Andric };
3604eeddc0SDimitry Andric inline constexpr last_spec last{};
3704eeddc0SDimitry Andric 
3804eeddc0SDimitry Andric } // namespace chrono
3904eeddc0SDimitry Andric 
4004eeddc0SDimitry Andric _LIBCPP_END_NAMESPACE_STD
4104eeddc0SDimitry Andric 
4206c3fb27SDimitry Andric #endif // _LIBCPP_STD_VER >= 20
4304eeddc0SDimitry Andric 
4404eeddc0SDimitry Andric #endif // _LIBCPP___CHRONO_CALENDAR_H
45