16 #include <boost/test/unit_test.hpp>
25 using namespace std::chrono_literals;
47 std::chrono::hours{23} + std::chrono::minutes{1} + std::chrono::seconds{12};
49 BOOST_CHECK_EQUAL(
"2 years, 5 months, 2 weeks, 3 days, 23 hours, 1 minute, and 12 seconds",
utils::format_timespan(time,
true));
54 constexpr
auto time =
chrono::days{2} + std::chrono::hours{1} + std::chrono::seconds{4};
72 constexpr
auto time =
chrono::months{2} + std::chrono::seconds{10};
78 BOOST_AUTO_TEST_SUITE_END()
std::chrono::duration< int, std::ratio< 2629746 > > months
std::chrono::duration< int, std::ratio< 31556952 > > years
std::chrono::duration< int, std::ratio< 604800 > > weeks
std::chrono::duration< int, std::ratio< 86400 > > days
static std::string format_timespan(const std::chrono::duration< Rep, Period > &span, bool detailed=false)
Formats a timespan into human-readable text for player authentication functions.
BOOST_AUTO_TEST_SUITE(filesystem)
static map_location::direction s