Skip to content

Commit

Permalink
test: add a fallback definition for std::chrono::days
Browse files Browse the repository at this point in the history
  • Loading branch information
intelfx committed Dec 2, 2023
1 parent 99b9fbf commit 25a9bee
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions test/chrono-test.cc
Original file line number Diff line number Diff line change
Expand Up @@ -24,6 +24,12 @@ using testing::Contains;
# define FMT_HAS_C99_STRFTIME 1
#endif

#if defined(__cpp_lib_chrono) && __cpp_lib_chrono >= 201907L
using days = std::chrono::days;
#else
using days = std::chrono::duration<std::chrono::hours::rep, std::ratio<86400>>;
#endif

auto make_tm() -> std::tm {
auto time = std::tm();
time.tm_mday = 1;
Expand Down

0 comments on commit 25a9bee

Please sign in to comment.