26#ifndef FMT_USE_LOCAL_TIME
27# ifdef __cpp_lib_chrono
28# define FMT_USE_LOCAL_TIME (__cpp_lib_chrono >= 201907L)
30# define FMT_USE_LOCAL_TIME 0
35#ifndef FMT_USE_UTC_TIME
36# ifdef __cpp_lib_chrono
37# define FMT_USE_UTC_TIME (__cpp_lib_chrono >= 201907L)
39# define FMT_USE_UTC_TIME 0
46# if FMT_HAS_INCLUDE("winapifamily.h")
47# include <winapifamily.h>
49# if defined(_WIN32) && (!defined(WINAPI_FAMILY) || \
50 (WINAPI_FAMILY == WINAPI_FAMILY_DESKTOP_APP))
51# define FMT_USE_TZSET 1
53# define FMT_USE_TZSET 0
58#ifndef FMT_SAFE_DURATION_CAST
59# define FMT_SAFE_DURATION_CAST 1
61#if FMT_SAFE_DURATION_CAST
71template <
typename To,
typename From,
77 using F = std::numeric_limits<From>;
78 using T = std::numeric_limits<To>;
93 return static_cast<To
>(
from);
100template <
typename To,
typename From,
106 using F = std::numeric_limits<From>;
107 using T = std::numeric_limits<To>;
119 from >
static_cast<From
>(detail::max_value<To>())) {
126 F::digits >= T::digits) &&
127 from >
static_cast<From
>(detail::max_value<To>())) {
131 return static_cast<To
>(
from);
134template <
typename To,
typename From,
155template <
typename To,
typename From,
159 using T = std::numeric_limits<To>;
160 static_assert(std::is_floating_point<From>::value,
"From must be floating");
161 static_assert(std::is_floating_point<To>::value,
"To must be floating");
166 return static_cast<To
>(
from);
174 return static_cast<To
>(
from);
177template <
typename To,
typename From,
181 static_assert(std::is_floating_point<From>::value,
"From must be floating");
188template <
typename To,
typename FromRep,
typename FromPeriod,
193 using From = std::chrono::duration<FromRep, FromPeriod>;
198 : std::ratio_divide<typename From::period, typename To::period> {};
200 static_assert(Factor::num > 0,
"num must be positive");
201 static_assert(Factor::den > 0,
"den must be positive");
207 using IntermediateRep =
208 typename std::common_type<
typename From::rep,
typename To::rep,
209 decltype(Factor::num)>
::type;
212 IntermediateRep
count =
213 lossless_integral_conversion<IntermediateRep>(
from.count(), ec);
217 const auto max1 = detail::max_value<IntermediateRep>() / Factor::num;
229 count *= Factor::num;
233 auto tocount = lossless_integral_conversion<typename To::rep>(
count, ec);
234 return ec ? To() : To(tocount);
240template <
typename To,
typename FromRep,
typename FromPeriod,
242 FMT_ENABLE_IF(std::is_floating_point<typename To::rep>::value)>
245 using From = std::chrono::duration<FromRep, FromPeriod>;
249 return To{std::numeric_limits<typename To::rep>::quiet_NaN()};
255 if (std::isinf(
from.count())) {
256 return To{
from.count()};
262 : std::ratio_divide<typename From::period, typename To::period> {};
264 static_assert(Factor::num > 0,
"num must be positive");
265 static_assert(Factor::den > 0,
"den must be positive");
271 using IntermediateRep =
272 typename std::common_type<
typename From::rep,
typename To::rep,
273 decltype(Factor::num)>
::type;
277 IntermediateRep
count =
278 safe_float_conversion<IntermediateRep>(
from.count(), ec);
285 constexpr auto max1 = detail::max_value<IntermediateRep>() /
286 static_cast<IntermediateRep
>(Factor::num);
291 constexpr auto min1 = std::numeric_limits<IntermediateRep>::lowest() /
292 static_cast<IntermediateRep
>(Factor::num);
297 count *=
static_cast<IntermediateRep
>(Factor::num);
307 using ToRep =
typename To::rep;
309 const ToRep tocount = safe_float_conversion<ToRep>(
count, ec);
323template <
typename T =
void>
struct null {};
330 static const auto&
locale = std::locale::classic();
339template <
typename CodeUnit>
342template <
typename CodeUnit>
344 const std::locale& loc) {
346# pragma clang diagnostic push
347# pragma clang diagnostic ignored "-Wdeprecated"
348 auto& f = std::use_facet<std::codecvt<CodeUnit, char, std::mbstate_t>>(loc);
349# pragma clang diagnostic pop
351 auto& f = std::use_facet<std::codecvt<CodeUnit, char, std::mbstate_t>>(loc);
353 auto mb = std::mbstate_t();
354 const char* from_next =
nullptr;
355 auto result = f.in(mb, in_buf.
begin(), in_buf.
end(), from_next,
356 std::begin(out.
buf), std::end(out.
buf), out.
end);
357 if (result != std::codecvt_base::ok)
358 FMT_THROW(format_error(
"failed to format time"));
361template <
typename OutputIt>
367#if FMT_MSC_VERSION != 0 || \
368 (defined(__GLIBCXX__) && !defined(_GLIBCXX_USE_DUAL_ABI))
371 using code_unit = wchar_t;
373 using code_unit = char32_t;
382 if (!u.convert({unit.buf, to_unsigned(unit.end - unit.buf)}))
383 FMT_THROW(format_error(
"failed to format time"));
384 return copy_str<char>(u.c_str(), u.c_str() + u.size(), out);
386 return copy_str<char>(
in.data(),
in.data() +
in.size(), out);
389template <
typename Char,
typename OutputIt,
395 return copy_str<Char>(unit.
buf, unit.
end, out);
398template <
typename Char,
typename OutputIt,
405template <
typename Char>
407 const std::locale& loc,
char format,
char modifier) {
409 auto&& os = std::basic_ostream<Char>(&format_buf);
411 using iterator = std::ostreambuf_iterator<Char>;
412 const auto& facet = std::use_facet<std::time_put<Char, iterator>>(loc);
413 auto end = facet.put(os, os, Char(
' '), &time,
format, modifier);
414 if (end.failed())
FMT_THROW(format_error(
"failed to format time"));
417template <
typename Char,
typename OutputIt,
419auto write(OutputIt out,
const std::tm& time,
const std::locale& loc,
420 char format,
char modifier = 0) -> OutputIt {
421 auto&& buf = get_buffer<Char>(out);
422 do_write<Char>(buf, time, loc,
format, modifier);
426template <
typename Char,
typename OutputIt,
428auto write(OutputIt out,
const std::tm& time,
const std::locale& loc,
429 char format,
char modifier = 0) -> OutputIt {
431 do_write<char>(buf, time, loc,
format, modifier);
449 dispatcher(std::time_t t) : time_(t) {}
452 using namespace fmt::detail;
453 return handle(localtime_r(&time_, &tm_));
456 bool handle(std::tm* tm) {
return tm !=
nullptr; }
459 using namespace fmt::detail;
463 bool fallback(
int res) {
return res == 0; }
467 using namespace fmt::detail;
470 return tm !=
nullptr;
476 if (!lt.run())
FMT_THROW(format_error(
"time_t value out of range"));
480#if FMT_USE_LOCAL_TIME
481template <
typename Duration>
482inline auto localtime(std::chrono::local_time<Duration> time) -> std::tm {
483 return localtime(std::chrono::system_clock::to_time_t(
484 std::chrono::current_zone()->to_sys(time)));
498 dispatcher(std::time_t t) : time_(t) {}
501 using namespace fmt::detail;
502 return handle(
gmtime_r(&time_, &tm_));
505 bool handle(std::tm* tm) {
return tm !=
nullptr; }
508 using namespace fmt::detail;
509 return fallback(
gmtime_s(&tm_, &time_));
512 bool fallback(
int res) {
return res == 0; }
518 return tm !=
nullptr;
522 auto gt = dispatcher(time);
524 if (!gt.run())
FMT_THROW(format_error(
"time_t value out of range"));
529 std::chrono::time_point<std::chrono::system_clock> time_point) {
530 return gmtime(std::chrono::system_clock::to_time_t(time_point));
539 unsigned c,
char sep) {
540 unsigned long long digits =
541 a | (b << 24) | (static_cast<unsigned long long>(
c) << 48);
551 digits += (((digits * 205) >> 11) & 0x000f00000f00000f) * 6;
553 digits = ((digits & 0x00f00000f00000f0) >> 4) |
554 ((digits & 0x000f00000f00000f) << 8);
555 auto usep =
static_cast<unsigned long long>(sep);
557 digits |= 0x3030003030003030 | (usep << 16) | (usep << 40);
559 constexpr const size_t len = 8;
562 std::memcpy(tmp, &digits, len);
563 std::reverse_copy(tmp, tmp + len, buf);
565 std::memcpy(buf, &digits, len);
570 if (std::is_same<Period, std::atto>::value)
return "as";
571 if (std::is_same<Period, std::femto>::value)
return "fs";
572 if (std::is_same<Period, std::pico>::value)
return "ps";
573 if (std::is_same<Period, std::nano>::value)
return "ns";
574 if (std::is_same<Period, std::micro>::value)
return "µs";
575 if (std::is_same<Period, std::milli>::value)
return "ms";
576 if (std::is_same<Period, std::centi>::value)
return "cs";
577 if (std::is_same<Period, std::deci>::value)
return "ds";
578 if (std::is_same<Period, std::ratio<1>>::value)
return "s";
579 if (std::is_same<Period, std::deca>::value)
return "das";
580 if (std::is_same<Period, std::hecto>::value)
return "hs";
581 if (std::is_same<Period, std::kilo>::value)
return "ks";
582 if (std::is_same<Period, std::mega>::value)
return "Ms";
583 if (std::is_same<Period, std::giga>::value)
return "Gs";
584 if (std::is_same<Period, std::tera>::value)
return "Ts";
585 if (std::is_same<Period, std::peta>::value)
return "Ps";
586 if (std::is_same<Period, std::exa>::value)
return "Es";
587 if (std::is_same<Period, std::ratio<60>>::value)
return "m";
588 if (std::is_same<Period, std::ratio<3600>>::value)
return "h";
610template <
typename OutputIt>
616template <
typename OutputIt>
623template <
typename Char,
typename Handler>
627 if (begin == end || *begin ==
'}')
return begin;
628 if (*begin !=
'%')
FMT_THROW(format_error(
"invalid format"));
638 if (begin !=
ptr) handler.on_text(begin,
ptr);
640 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
656 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
660 handler.on_text(
ptr - 1,
ptr);
663 const Char newline[] = {
'\n'};
664 handler.on_text(newline, newline + 1);
668 const Char tab[] = {
'\t'};
669 handler.on_text(tab, tab + 1);
683 handler.on_iso_week_based_year();
686 handler.on_iso_week_based_short_year();
690 handler.on_abbr_weekday();
693 handler.on_full_weekday();
704 handler.on_abbr_month();
707 handler.on_full_month();
723 handler.on_day_of_year();
755 handler.on_us_date();
758 handler.on_iso_date();
761 handler.on_12_hour_time();
764 handler.on_24_hour_time();
767 handler.on_iso_time();
773 handler.on_duration_value();
776 handler.on_duration_unit();
782 handler.on_tz_name();
786 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
793 handler.on_offset_year();
811 FMT_THROW(format_error(
"invalid format"));
816 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
862 FMT_THROW(format_error(
"invalid format"));
866 FMT_THROW(format_error(
"invalid format"));
870 if (begin !=
ptr) handler.on_text(begin,
ptr);
919 template <
typename Char>
958 static constexpr const char* full_name_list[] = {
959 "Sunday",
"Monday",
"Tuesday",
"Wednesday",
960 "Thursday",
"Friday",
"Saturday"};
961 return wday >= 0 && wday <= 6 ? full_name_list[wday] :
"?";
964 static constexpr const char* short_name_list[] = {
"Sun",
"Mon",
"Tue",
"Wed",
965 "Thu",
"Fri",
"Sat"};
966 return wday >= 0 && wday <= 6 ? short_name_list[wday] :
"???";
970 static constexpr const char* full_name_list[] = {
971 "January",
"February",
"March",
"April",
"May",
"June",
972 "July",
"August",
"September",
"October",
"November",
"December"};
973 return mon >= 0 && mon <= 11 ? full_name_list[mon] :
"?";
976 static constexpr const char* short_name_list[] = {
977 "Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
978 "Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
980 return mon >= 0 && mon <= 11 ? short_name_list[mon] :
"???";
983template <
typename T,
typename =
void>
989template <
typename T,
typename =
void>
996inline void tzset_once() {
997 static bool init = []() ->
bool {
1006template <
typename T,
typename Int, FMT_ENABLE_IF(std::is_
integral<T>::value)>
1012 return static_cast<Int
>(
value);
1014template <
typename T,
typename Int, FMT_ENABLE_IF(!std::is_
integral<T>::value)>
1016 if (value < 0 || value >
static_cast<T
>(upper))
1017 FMT_THROW(format_error(
"invalid value"));
1018 return static_cast<Int
>(value);
1021constexpr long long pow10(std::uint32_t n) {
1022 return n == 0 ? 1 : 10 *
pow10(n - 1);
1028template <
long long Num,
long long Den,
int N = 0,
1029 bool Enabled = (N < 19) && (Num <= max_value<long long>() / 10)>
1037template <
long long Num,
long long Den,
int N>
1039 static constexpr int value = (Num % Den == 0) ? N : 6;
1044template <
typename Char,
typename OutputIt,
typename Duration>
1046 constexpr auto num_fractional_digits =
1048 Duration::period::den>::value;
1050 using subsecond_precision = std::chrono::duration<
1051 typename std::common_type<
typename Duration::rep,
1052 std::chrono::seconds::rep>
::type,
1055 const auto fractional =
1056 d - std::chrono::duration_cast<std::chrono::seconds>(d);
1057 const auto subseconds =
1058 std::chrono::treat_as_floating_point<
1059 typename subsecond_precision::rep>::value
1060 ? fractional.count()
1061 : std::chrono::duration_cast<subsecond_precision>(fractional).count();
1065 int leading_zeroes = (
std::max)(0, num_fractional_digits - num_digits);
1067 FMT_ASSERT(!std::is_floating_point<typename Duration::rep>::value,
"");
1068 if (std::ratio_less<
typename subsecond_precision::period,
1069 std::chrono::seconds::period>::value) {
1072 out = format_decimal<Char>(out, n, num_digits).end;
1078 int remaining =
precision - leading_zeroes;
1079 if (remaining != 0 && remaining < num_digits) {
1081 out = format_decimal<Char>(out, n, remaining).end;
1084 out = format_decimal<Char>(out, n, num_digits).end;
1085 remaining -= num_digits;
1093template <
typename Duration>
1095 int num_fractional_digits = -1) {
1096 using rep =
typename Duration::rep;
1097 FMT_ASSERT(std::is_floating_point<rep>::value,
"");
1099 auto val = duration.count();
1101 if (num_fractional_digits < 0) {
1104 using namespace std;
1105 num_fractional_digits =
1107 Duration::period::den>::value;
1108 if (num_fractional_digits < 6 &&
static_cast<rep
>(
round(val)) != val)
1109 num_fractional_digits = 6;
1113 std::fmod(val *
static_cast<rep
>(Duration::period::num) /
1114 static_cast<rep
>(Duration::period::den),
1115 static_cast<rep
>(60)),
1116 num_fractional_digits);
1119template <
typename OutputIt,
typename Char,
1120 typename Duration = std::chrono::seconds>
1123 static constexpr int days_per_week = 7;
1125 const std::locale& loc_;
1126 const bool is_classic_;
1128 const Duration* subsecs_;
1131 auto tm_sec()
const noexcept ->
int {
1132 FMT_ASSERT(tm_.tm_sec >= 0 && tm_.tm_sec <= 61,
"");
1135 auto tm_min()
const noexcept ->
int {
1136 FMT_ASSERT(tm_.tm_min >= 0 && tm_.tm_min <= 59,
"");
1139 auto tm_hour()
const noexcept ->
int {
1140 FMT_ASSERT(tm_.tm_hour >= 0 && tm_.tm_hour <= 23,
"");
1143 auto tm_mday()
const noexcept ->
int {
1144 FMT_ASSERT(tm_.tm_mday >= 1 && tm_.tm_mday <= 31,
"");
1147 auto tm_mon()
const noexcept ->
int {
1148 FMT_ASSERT(tm_.tm_mon >= 0 && tm_.tm_mon <= 11,
"");
1151 auto tm_year()
const noexcept ->
long long {
return 1900ll + tm_.tm_year; }
1152 auto tm_wday()
const noexcept ->
int {
1153 FMT_ASSERT(tm_.tm_wday >= 0 && tm_.tm_wday <= 6,
"");
1156 auto tm_yday()
const noexcept ->
int {
1157 FMT_ASSERT(tm_.tm_yday >= 0 && tm_.tm_yday <= 365,
"");
1161 auto tm_hour12()
const noexcept ->
int {
1162 const auto h = tm_hour();
1163 const auto z =
h < 12 ?
h :
h - 12;
1164 return z == 0 ? 12 : z;
1171 auto split_year_lower(
long long year)
const noexcept ->
int {
1172 auto l = year % 100;
1174 return static_cast<int>(l);
1179 auto iso_year_weeks(
long long curr_year)
const noexcept ->
int {
1180 const auto prev_year = curr_year - 1;
1182 (curr_year + curr_year / 4 - curr_year / 100 + curr_year / 400) %
1185 (prev_year + prev_year / 4 - prev_year / 100 + prev_year / 400) %
1187 return 52 + ((curr_p == 4 || prev_p == 3) ? 1 : 0);
1189 auto iso_week_num(
int tm_yday,
int tm_wday)
const noexcept ->
int {
1190 return (tm_yday + 11 - (tm_wday == 0 ? days_per_week : tm_wday)) /
1193 auto tm_iso_week_year()
const noexcept ->
long long {
1194 const auto year = tm_year();
1195 const auto w = iso_week_num(tm_yday(), tm_wday());
1196 if (w < 1)
return year - 1;
1197 if (w > iso_year_weeks(year))
return year + 1;
1200 auto tm_iso_week_of_year()
const noexcept ->
int {
1201 const auto year = tm_year();
1202 const auto w = iso_week_num(tm_yday(), tm_wday());
1203 if (w < 1)
return iso_year_weeks(year - 1);
1204 if (w > iso_year_weeks(year))
return 1;
1208 void write1(
int value) {
1211 void write2(
int value) {
1224 *out_++ =
static_cast<char>(
'0' + v);
1228 void write_year_extended(
long long year) {
1239 out_ = format_decimal<Char>(out_, n, num_digits).end;
1241 void write_year(
long long year) {
1242 if (year >= 0 && year < 10000) {
1243 write2(
static_cast<int>(year / 100));
1244 write2(
static_cast<int>(year % 100));
1246 write_year_extended(year);
1258 write2(
static_cast<int>(offset / 60));
1260 write2(
static_cast<int>(offset % 60));
1262 template <
typename T, FMT_ENABLE_IF(has_member_data_tm_gmtoff<T>::value)>
1264 write_utc_offset(tm.tm_gmtoff, ns);
1266 template <
typename T, FMT_ENABLE_IF(!has_member_data_tm_gmtoff<T>::value)>
1268#if defined(_WIN32) && defined(_UCRT)
1273 _get_timezone(&offset);
1276 _get_dstbias(&dstbias);
1279 write_utc_offset(-offset, ns);
1285 std::time_t gt = std::mktime(>m);
1286 std::tm ltm =
gmtime(gt);
1287 std::time_t lt = std::mktime(<m);
1288 long offset = gt - lt;
1289 write_utc_offset(offset, ns);
1293 template <
typename T, FMT_ENABLE_IF(has_member_data_tm_zone<T>::value)>
1294 void format_tz_name_impl(
const T& tm) {
1296 out_ = write_tm_str<Char>(out_, tm.tm_zone, loc_);
1298 format_localized(
'Z');
1300 template <
typename T, FMT_ENABLE_IF(!has_member_data_tm_zone<T>::value)>
1301 void format_tz_name_impl(
const T&) {
1302 format_localized(
'Z');
1305 void format_localized(
char format,
char modifier = 0) {
1306 out_ = write<Char>(out_, tm_, loc_,
format, modifier);
1311 const Duration* subsecs =
nullptr)
1318 OutputIt
out()
const {
return out_; }
1321 out_ = copy_str<Char>(begin, end, out_);
1328 format_localized(
'a');
1334 format_localized(
'A');
1338 format_localized(
'w',
'O');
1342 auto wday = tm_wday();
1343 write1(wday == 0 ? days_per_week : wday);
1345 format_localized(
'u',
'O');
1353 format_localized(
'b');
1359 format_localized(
'B');
1394 out_ = copy_str<Char>(std::begin(buf), std::end(buf), out_);
1397 auto year = tm_year();
1400 if (year >= 0 && year < 10000) {
1404 write_year_extended(year);
1410 out_ = copy_str<Char>(std::begin(buf) + offset, std::end(buf), out_);
1418 return write_year(tm_year());
1419 format_localized(
'Y',
'E');
1423 return write2(split_year_lower(tm_year()));
1424 format_localized(
'y',
'O');
1427 if (is_classic_)
return write2(split_year_lower(tm_year()));
1428 format_localized(
'y',
'E');
1433 auto year = tm_year();
1434 auto upper = year / 100;
1435 if (year >= -99 && year < 0) {
1439 }
else if (upper >= 0 && upper < 100) {
1440 write2(
static_cast<int>(upper));
1442 out_ = write<Char>(out_, upper);
1445 format_localized(
'C',
'E');
1451 return write2(tm_mon() + 1);
1452 format_localized(
'm',
'O');
1457 return write2((tm_yday() + days_per_week - tm_wday()) / days_per_week);
1458 format_localized(
'U',
'O');
1462 auto wday = tm_wday();
1463 write2((tm_yday() + days_per_week -
1464 (wday == 0 ? (days_per_week - 1) : (wday - 1))) /
1467 format_localized(
'W',
'O');
1472 return write2(tm_iso_week_of_year());
1473 format_localized(
'V',
'O');
1478 write2(split_year_lower(tm_iso_week_year()));
1482 auto yday = tm_yday() + 1;
1488 format_localized(
'd',
'O');
1493 const char* d2 =
digits2(mday);
1494 *out_++ = mday < 10 ?
' ' : d2[0];
1497 format_localized(
'e',
'O');
1503 return write2(tm_hour(), pad);
1504 format_localized(
'H',
'O');
1508 return write2(tm_hour12(), pad);
1509 format_localized(
'I',
'O');
1513 return write2(tm_min(), pad);
1514 format_localized(
'M',
'O');
1519 write2(tm_sec(), pad);
1521 if (std::is_floating_point<typename Duration::rep>::value) {
1524 if (buf.size() > 1) {
1526 out_ =
std::copy(buf.begin() + 1, buf.end(), out_);
1529 write_fractional_seconds<Char>(out_, *subsecs_);
1534 format_localized(
'S',
'O');
1543 out_ = copy_str<Char>(std::begin(buf), std::end(buf), out_);
1547 format_localized(
'r');
1563 *out_++ = tm_hour() < 12 ?
'A' :
'P';
1566 format_localized(
'p');
1580 template <
typename Char>
1592 FMT_THROW(format_error(
"precision not allowed for this argument type"));
1598template <
typename T,
1599 FMT_ENABLE_IF(std::is_integral<T>::value&& has_isfinite<T>::value)>
1604template <
typename T, FMT_ENABLE_IF(std::is_
integral<T>::value)>
1606 return x %
static_cast<T
>(y);
1608template <
typename T, FMT_ENABLE_IF(std::is_
floating_po
int<T>::value)>
1609inline T
mod(T x,
int y) {
1615template <typename T, bool INTEGRAL = std::is_integral<T>::value>
1624#if FMT_SAFE_DURATION_CAST
1626template <
typename To,
typename FromRep,
typename FromPeriod>
1629 To to = safe_duration_cast::safe_duration_cast<To>(
from, ec);
1630 if (ec)
FMT_THROW(format_error(
"cannot format duration"));
1635template <
typename Rep,
typename Period,
1638 std::chrono::duration<Rep, Period> d) {
1641#if FMT_SAFE_DURATION_CAST
1642 using CommonSecondsType =
1643 typename std::common_type<
decltype(d), std::chrono::seconds>
::type;
1644 const auto d_as_common = fmt_safe_duration_cast<CommonSecondsType>(d);
1645 const auto d_as_whole_seconds =
1646 fmt_safe_duration_cast<std::chrono::seconds>(d_as_common);
1648 const auto diff = d_as_common - d_as_whole_seconds;
1650 fmt_safe_duration_cast<std::chrono::duration<Rep, std::milli>>(diff);
1653 auto s = std::chrono::duration_cast<std::chrono::seconds>(d);
1654 return std::chrono::duration_cast<std::chrono::milliseconds>(d - s);
1658template <
typename Char,
typename Rep,
typename OutputIt,
1661 return write<Char>(out, val);
1664template <
typename Char,
typename Rep,
typename OutputIt,
1668 specs.precision = precision;
1671 return write<Char>(out, val, specs);
1674template <
typename Char,
typename OutputIt>
1679template <
typename OutputIt>
1687template <
typename Char,
typename Period,
typename OutputIt>
1689 if (
const char* unit = get_units<Period>())
1692 out = write<Char>(out, Period::num);
1695 out = write<Char>(out, Period::den);
1707 bool has_locale_ =
false;
1712 ::new (&
locale_) std::locale(loc.template get<std::locale>());
1715 if (has_locale_)
locale_.~locale();
1717 operator const std::locale&()
const {
1722template <
typename FormatContext,
typename OutputIt,
typename Rep,
1743 std::chrono::duration<Rep, Period> d)
1748 if (d.count() < 0) {
1755#if FMT_SAFE_DURATION_CAST
1757 auto tmpval = std::chrono::duration<rep, Period>(
val);
1758 s = fmt_safe_duration_cast<seconds>(tmpval);
1760 s = std::chrono::duration_cast<seconds>(
1761 std::chrono::duration<rep, Period>(
val));
1783 Rep
hour()
const {
return static_cast<Rep
>(
mod((
s.count() / 3600), 24)); }
1786 Rep
hour =
static_cast<Rep
>(
mod((
s.count() / 3600), 12));
1790 Rep
minute()
const {
return static_cast<Rep
>(
mod((
s.count() / 60), 60)); }
1791 Rep
second()
const {
return static_cast<Rep
>(
mod(
s.count(), 60)); }
1794 auto time = std::tm();
1814 if (
width > num_digits) {
1817 out = format_decimal<char_type>(
out, n, num_digits).end;
1824 template <
typename Callback,
typename... Args>
1896 if (std::is_floating_point<rep>::value) {
1901 if (buf.size() < 2 || buf[1] ==
'.') {
1907 write_fractional_seconds<char_type>(
1953 out = format_duration_unit<char_type, Period>(
out);
1959#if defined(__cpp_lib_chrono) && __cpp_lib_chrono >= 201907
1960using weekday = std::chrono::weekday;
1965 unsigned char value;
1970 : value(
static_cast<unsigned char>(wd != 7 ? wd : 0)) {}
1980 bool localized =
false;
1984 ->
decltype(ctx.begin()) {
1985 auto begin = ctx.begin(), end = ctx.end();
1986 if (begin != end && *begin ==
'L') {
1993 template <
typename FormatContext>
1995 auto time = std::tm();
1996 time.tm_wday =
static_cast<int>(wd.c_encoding());
2004template <
typename Rep,
typename Period,
typename Char>
2010 bool localized_ =
false;
2015 ->
decltype(ctx.begin()) {
2016 auto it = ctx.begin(), end = ctx.end();
2017 if (it == end || *it ==
'}')
return it;
2020 if (it == end)
return it;
2023 if (it == end)
return it;
2027 checker.has_precision_integral = !std::is_floating_point<Rep>::value;
2031 if (it != end && *it ==
'L') {
2040 template <
typename FormatContext>
2041 auto format(std::chrono::duration<Rep, Period> d, FormatContext& ctx)
const
2042 ->
decltype(ctx.out()) {
2043 auto specs = specs_;
2044 auto precision = specs.precision;
2045 specs.precision = -1;
2046 auto begin = format_str_.
begin(), end = format_str_.
end();
2050 auto out = std::back_inserter(buf);
2051 detail::handle_dynamic_spec<detail::width_checker>(specs.width, width_ref_,
2053 detail::handle_dynamic_spec<detail::precision_checker>(precision,
2054 precision_ref_, ctx);
2055 if (begin == end || *begin ==
'}') {
2056 out = detail::format_duration_value<Char>(out, d.count(), precision);
2057 detail::format_duration_unit<Char, Period>(out);
2059 using chrono_formatter =
2061 auto f = chrono_formatter(ctx, out, d);
2071template <
typename Char,
typename Duration>
2072struct formatter<
std::chrono::time_point<std::chrono::system_clock, Duration>,
2078 template <
typename FormatContext>
2079 auto format(std::chrono::time_point<std::chrono::system_clock, Duration> val,
2080 FormatContext& ctx)
const ->
decltype(ctx.out()) {
2081 using period =
typename Duration::period;
2083 period::num != 1 || period::den != 1 ||
2084 std::is_floating_point<typename Duration::rep>::value)) {
2085 const auto epoch = val.time_since_epoch();
2086 auto subsecs = std::chrono::duration_cast<Duration>(
2087 epoch - std::chrono::duration_cast<std::chrono::seconds>(epoch));
2089 if (subsecs.count() < 0) {
2091 std::chrono::duration_cast<Duration>(std::chrono::seconds(1));
2093 FMT_THROW(format_error(
"duration is too small"));
2099 gmtime(std::chrono::time_point_cast<std::chrono::seconds>(val)), ctx,
2104 gmtime(std::chrono::time_point_cast<std::chrono::seconds>(val)), ctx);
2108#if FMT_USE_LOCAL_TIME
2109template <
typename Char,
typename Duration>
2110struct formatter<
std::chrono::local_time<Duration>, Char>
2116 template <
typename FormatContext>
2117 auto format(std::chrono::local_time<Duration> val, FormatContext& ctx)
const
2118 ->
decltype(ctx.out()) {
2119 using period =
typename Duration::period;
2120 if (period::num != 1 || period::den != 1 ||
2121 std::is_floating_point<typename Duration::rep>::value) {
2122 const auto epoch = val.time_since_epoch();
2123 const auto subsecs = std::chrono::duration_cast<Duration>(
2124 epoch - std::chrono::duration_cast<std::chrono::seconds>(epoch));
2127 localtime(std::chrono::time_point_cast<std::chrono::seconds>(val)),
2132 localtime(std::chrono::time_point_cast<std::chrono::seconds>(val)),
2139template <
typename Char,
typename Duration>
2140struct formatter<
std::chrono::time_point<std::chrono::utc_clock, Duration>,
2142 :
formatter<std::chrono::time_point<std::chrono::system_clock, Duration>,
2144 template <
typename FormatContext>
2145 auto format(std::chrono::time_point<std::chrono::utc_clock, Duration> val,
2146 FormatContext& ctx)
const ->
decltype(ctx.out()) {
2148 std::chrono::time_point<std::chrono::system_clock, Duration>,
2149 Char>
::format(std::chrono::utc_clock::to_sys(val), ctx);
2162 template <
typename FormatContext,
typename Duration>
2164 const Duration* subsecs)
const ->
decltype(ctx.out()) {
2165 auto specs = specs_;
2167 auto out = std::back_inserter(buf);
2168 detail::handle_dynamic_spec<detail::width_checker>(specs.width, width_ref_,
2171 auto loc_ref = ctx.locale();
2182 ->
decltype(ctx.begin()) {
2183 auto it = ctx.begin(), end = ctx.end();
2184 if (it == end || *it ==
'}')
return it;
2187 if (it == end)
return it;
2190 if (it == end)
return it;
2198 template <
typename FormatContext>
2199 auto format(
const std::tm& tm, FormatContext& ctx)
const
2200 ->
decltype(ctx.out()) {
2201 return do_format<FormatContext, std::chrono::seconds>(tm, ctx,
nullptr);
and restrictions which apply to each piece of software is included later in this file and or inside of the individual applicable source files The disclaimer of warranty in the WPILib license above applies to all code in and nothing in any of the other licenses gives permission to use the names of FIRST nor the names of the WPILib contributors to endorse or promote products derived from this software The following pieces of software have additional or alternate and or Google Inc All rights reserved Redistribution and use in source and binary with or without are permitted provided that the following conditions are this list of conditions and the following disclaimer *Redistributions in binary form must reproduce the above copyright this list of conditions and the following disclaimer in the documentation and or other materials provided with the distribution *Neither the name of Google Inc nor the names of its contributors may be used to endorse or promote products derived from this software without specific prior written permission THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS AS IS AND ANY EXPRESS OR IMPLIED BUT NOT LIMITED THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE DISCLAIMED IN NO EVENT SHALL THE COPYRIGHT OWNER OR CONTRIBUTORS BE LIABLE FOR ANY OR CONSEQUENTIAL WHETHER IN STRICT OR EVEN IF ADVISED OF THE POSSIBILITY OF SUCH January AND DISTRIBUTION Definitions License shall mean the terms and conditions for and distribution as defined by Sections through of this document Licensor shall mean the copyright owner or entity authorized by the copyright owner that is granting the License Legal Entity shall mean the union of the acting entity and all other entities that control are controlled by or are under common control with that entity For the purposes of this definition control direct or to cause the direction or management of such whether by contract or including but not limited to software source documentation and configuration files Object form shall mean any form resulting from mechanical transformation or translation of a Source including but not limited to compiled object generated and conversions to other media types Work shall mean the work of whether in Source or Object made available under the as indicated by a copyright notice that is included in or attached to the whether in Source or Object that is based or other modifications as a an original work of authorship For the purposes of this Derivative Works shall not include works that remain separable from
Definition: ThirdPartyNotices.txt:128
\rst Parsing context consisting of a format string range being parsed and an argument counter for aut...
Definition: core.h:656
\rst A dynamically growing memory buffer for trivially copyable/constructible types with the first SI...
Definition: format.h:918
constexpr auto end() const noexcept -> iterator
Definition: core.h:446
constexpr auto begin() const noexcept -> iterator
Definition: core.h:445
\rst A contiguous memory buffer with an optional growing ability.
Definition: core.h:798
Definition: chrono.h:1702
get_locale(bool localized, locale_ref loc)
Definition: chrono.h:1710
std::locale locale_
Definition: chrono.h:1705
~get_locale()
Definition: chrono.h:1714
Definition: chrono.h:1121
void on_offset_year()
Definition: chrono.h:1426
void on_12_hour_time()
Definition: chrono.h:1538
void on_day_of_month_space(numeric_system ns)
Definition: chrono.h:1490
OutputIt out() const
Definition: chrono.h:1318
void on_abbr_month()
Definition: chrono.h:1349
void on_iso_date()
Definition: chrono.h:1396
void on_iso_week_based_year()
Definition: chrono.h:1476
void on_year(numeric_system ns)
Definition: chrono.h:1416
void on_abbr_weekday()
Definition: chrono.h:1324
void on_am_pm()
Definition: chrono.h:1561
void on_dec0_weekday(numeric_system ns)
Definition: chrono.h:1336
tm_writer(const std::locale &loc, OutputIt out, const std::tm &tm, const Duration *subsecs=nullptr)
Definition: chrono.h:1310
void on_us_date()
Definition: chrono.h:1389
void on_iso_time()
Definition: chrono.h:1555
void on_duration_unit()
Definition: chrono.h:1572
void on_24_hour_time()
Definition: chrono.h:1550
void on_second(numeric_system ns, pad_type pad)
Definition: chrono.h:1517
void on_full_weekday()
Definition: chrono.h:1330
void on_12_hour(numeric_system ns, pad_type pad)
Definition: chrono.h:1506
FMT_CONSTEXPR void on_text(const Char *begin, const Char *end)
Definition: chrono.h:1320
void on_loc_time(numeric_system ns)
Definition: chrono.h:1383
void on_dec0_week_of_year(numeric_system ns)
Definition: chrono.h:1455
void on_tz_name()
Definition: chrono.h:1414
void on_short_year(numeric_system ns)
Definition: chrono.h:1421
void on_iso_week_based_short_year()
Definition: chrono.h:1477
void on_century(numeric_system ns)
Definition: chrono.h:1431
void on_minute(numeric_system ns, pad_type pad)
Definition: chrono.h:1511
void on_dec_month(numeric_system ns)
Definition: chrono.h:1449
void on_dec1_weekday(numeric_system ns)
Definition: chrono.h:1340
void on_loc_date(numeric_system ns)
Definition: chrono.h:1377
void on_full_month()
Definition: chrono.h:1355
void on_dec1_week_of_year(numeric_system ns)
Definition: chrono.h:1460
void on_day_of_month(numeric_system ns)
Definition: chrono.h:1486
void on_utc_offset(numeric_system ns)
Definition: chrono.h:1413
void on_iso_week_of_year(numeric_system ns)
Definition: chrono.h:1470
void on_duration_value()
Definition: chrono.h:1571
void on_24_hour(numeric_system ns, pad_type pad)
Definition: chrono.h:1501
void on_day_of_year()
Definition: chrono.h:1481
void on_datetime(numeric_system ns)
Definition: chrono.h:1362
Definition: format.h:1425
Definition: format.h:1410
auto size() const -> size_t
Definition: format.h:1417
auto c_str() const -> const wchar_t *
Definition: format.h:1418
Definition: chrono.h:1963
constexpr weekday(unsigned wd) noexcept
Definition: chrono.h:1969
constexpr unsigned c_encoding() const noexcept
Definition: chrono.h:1971
Definition: chrono.h:1974
#define FMT_ASSERT(condition, message)
Definition: core.h:336
#define FMT_END_EXPORT
Definition: core.h:185
basic_string_view< char > string_view
Definition: core.h:501
#define FMT_CONSTEXPR
Definition: core.h:105
#define FMT_BEGIN_NAMESPACE
Definition: core.h:174
#define FMT_ENABLE_IF(...)
Definition: core.h:286
#define FMT_BEGIN_EXPORT
Definition: core.h:184
#define FMT_NORETURN
Definition: core.h:147
typename std::conditional< B, T, F >::type conditional_t
Definition: core.h:258
#define FMT_END_NAMESPACE
Definition: core.h:177
FMT_BEGIN_EXPORT std::tm localtime(std::time_t time)
Converts given time since epoch as std::time_t value into calendar time, expressed in local time.
Definition: chrono.h:444
std::tm gmtime(std::time_t time)
Converts given time since epoch as std::time_t value into calendar time, expressed in Coordinated Uni...
Definition: chrono.h:493
UnitType round(const UnitType x) noexcept
Round to nearest.
Definition: math.h:591
UnitTypeLhs fmod(const UnitTypeLhs numer, const UnitTypeRhs denom) noexcept
Compute remainder of division.
Definition: math.h:558
detail namespace with internal helper functions
Definition: xchar.h:20
constexpr long long pow10(std::uint32_t n)
Definition: chrono.h:1021
null gmtime_s(...)
Definition: chrono.h:327
void void_t
Definition: core.h:1510
auto copy(const Range &range, OutputIt out) -> OutputIt
Definition: ranges.h:26
void write_floating_seconds(memory_buffer &buf, Duration duration, int num_fractional_digits=-1)
Definition: chrono.h:1094
std::integral_constant< bool, std::numeric_limits< T >::is_signed||std::is_same< T, int128_opt >::value > is_signed
Definition: format.h:811
FMT_CONSTEXPR void ignore_unused(const T &...)
Definition: core.h:302
auto write(OutputIt out, const std::tm &time, const std::locale &loc, char format, char modifier=0) -> OutputIt
Definition: chrono.h:419
const char * tm_wday_short_name(int wday)
Definition: chrono.h:963
auto is_big_endian() -> bool
Definition: format.h:353
pad_type
Definition: chrono.h:599
FMT_CONSTEXPR auto parse_dynamic_spec(const Char *begin, const Char *end, int &value, arg_ref< Char > &ref, basic_format_parse_context< Char > &ctx) -> const Char *
Definition: core.h:2237
void write_fractional_seconds(OutputIt &out, Duration d, int precision=-1)
Definition: chrono.h:1045
To fmt_safe_duration_cast(std::chrono::duration< FromRep, FromPeriod > from)
Definition: chrono.h:1627
numeric_system
Definition: chrono.h:592
auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale &loc) -> OutputIt
Definition: chrono.h:362
void do_write(buffer< Char > &buf, const std::tm &time, const std::locale &loc, char format, char modifier)
Definition: chrono.h:406
constexpr auto in(type t, int set) -> bool
Definition: core.h:611
OutputIt format_duration_value(OutputIt out, Rep val, int)
Definition: chrono.h:1660
null localtime_r FMT_NOMACRO(...)
Definition: chrono.h:324
null gmtime_r(...)
Definition: chrono.h:326
FMT_CONSTEXPR20 FMT_INLINE void copy2(Char *dst, const char *src)
Definition: format.h:1325
FMT_CONSTEXPR auto is_utf8() -> bool
Definition: core.h:380
OutputIt copy_unit(string_view unit, OutputIt out, Char)
Definition: chrono.h:1675
FMT_CONSTEXPR const Char * parse_chrono_format(const Char *begin, const Char *end, Handler &&handler)
Definition: chrono.h:624
FMT_CONSTEXPR auto fill_n(OutputIt out, Size count, const T &value) -> OutputIt
Definition: format.h:622
const std::locale & get_classic_locale()
Definition: chrono.h:329
FMT_CONSTEXPR const char * get_units()
Definition: chrono.h:569
void write_digit2_separated(char *buf, unsigned a, unsigned b, unsigned c, char sep)
Definition: chrono.h:538
constexpr auto count() -> size_t
Definition: core.h:1203
FMT_INLINE auto get_iterator(Buf &buf, OutputIt) -> decltype(buf.out())
Definition: core.h:1127
bool isfinite(T)
Definition: chrono.h:1600
auto write_padding(OutputIt out, pad_type pad, int width) -> OutputIt
Definition: chrono.h:611
constexpr bool isnan(T value)
Definition: format.h:2759
null localtime_s(...)
Definition: chrono.h:325
constexpr auto is_negative(T value) -> bool
Definition: format.h:1130
type
Definition: core.h:556
auto write_tm_str(OutputIt out, string_view sv, const std::locale &loc) -> OutputIt
Definition: chrono.h:391
constexpr FMT_INLINE auto const_check(T value) -> T
Definition: core.h:323
FMT_CONSTEXPR auto to_unsigned(Int value) -> typename std::make_unsigned< Int >::type
Definition: core.h:374
const char * tm_mon_full_name(int mon)
Definition: chrono.h:969
FMT_CONSTEXPR auto parse_precision(const Char *begin, const Char *end, int &value, arg_ref< Char > &ref, basic_format_parse_context< Char > &ctx) -> const Char *
Definition: core.h:2259
bool_constant< is_integral< T >::value &&!std::is_same< T, bool >::value &&!std::is_same< T, char >::value &&!std::is_same< T, wchar_t >::value > is_integer
Definition: format.h:817
T mod(T x, int y)
Definition: chrono.h:1605
const char * tm_mon_short_name(int mon)
Definition: chrono.h:975
FMT_CONSTEXPR20 auto count_digits(uint64_t n) -> int
Definition: format.h:1222
FMT_CONSTEXPR auto parse_align(const Char *begin, const Char *end, format_specs< Char > &specs) -> const Char *
Definition: format.h:2399
conditional_t< num_bits< T >()<=32 &&!FMT_REDUCE_INT_INSTANTIATIONS, uint32_t, conditional_t< num_bits< T >()<=64, uint64_t, uint128_t > > uint32_or_64_or_128_t
Definition: format.h:1152
Int to_nonnegative_int(T value, Int upper)
Definition: chrono.h:1007
void write_codecvt(codecvt_result< CodeUnit > &out, string_view in_buf, const std::locale &loc)
Definition: chrono.h:343
constexpr const char * digits2(size_t value)
Definition: format.h:1162
const char * tm_wday_full_name(int wday)
Definition: chrono.h:957
OutputIt format_duration_unit(OutputIt out)
Definition: chrono.h:1688
std::chrono::duration< Rep, std::milli > get_milliseconds(std::chrono::duration< Rep, Period > d)
Definition: chrono.h:1637
typename std::common_type< T... >::type common_t
Definition: gcem_options.hpp:80
To safe_duration_cast(std::chrono::duration< FromRep, FromPeriod > from, int &ec)
safe duration cast between integral durations
Definition: chrono.h:191
FMT_CONSTEXPR To safe_float_conversion(const From from, int &ec)
converts From to To if possible, otherwise ec is set.
Definition: chrono.h:157
FMT_CONSTEXPR To lossless_integral_conversion(const From from, int &ec)
converts From to To, without loss.
Definition: chrono.h:75
static constexpr const unit_t< compound_unit< energy::joule, time::seconds > > h(6.626070040e-34)
Planck constant.
static constexpr const unit_t< compound_unit< charge::coulomb, inverse< substance::mol > > > F(N_A *e)
Faraday constant.
static constexpr const velocity::meters_per_second_t c(299792458.0)
Speed of light in vacuum.
UnitTypeLhs() max(const UnitTypeLhs &lhs, const UnitTypeRhs &rhs)
Definition: base.h:3417
UnitTypeLhs() min(const UnitTypeLhs &lhs, const UnitTypeRhs &rhs)
Definition: base.h:3409
static constexpr const size_t max_size
Definition: chrono.h:335
CodeUnit * end
Definition: chrono.h:337
CodeUnit buf[max_size]
Definition: chrono.h:336
Definition: chrono.h:1038
Definition: chrono.h:1030
typename std::make_unsigned< T >::type type
Definition: chrono.h:1621
Definition: chrono.h:1616
T type
Definition: chrono.h:1617
FMT_CONSTEXPR void on_day_of_month(numeric_system)
Definition: chrono.h:895
FMT_CONSTEXPR void on_day_of_year()
Definition: chrono.h:894
FMT_CONSTEXPR void on_dec0_weekday(numeric_system)
Definition: chrono.h:886
FMT_CONSTEXPR void on_iso_date()
Definition: chrono.h:905
FMT_CONSTEXPR void on_loc_date(numeric_system)
Definition: chrono.h:902
FMT_CONSTEXPR void on_duration_value()
Definition: chrono.h:910
FMT_CONSTEXPR void on_dec1_weekday(numeric_system)
Definition: chrono.h:887
FMT_CONSTEXPR void on_12_hour(numeric_system)
Definition: chrono.h:898
FMT_CONSTEXPR void on_duration_unit()
Definition: chrono.h:911
FMT_CONSTEXPR void on_24_hour_time()
Definition: chrono.h:907
FMT_CONSTEXPR void on_century(numeric_system)
Definition: chrono.h:881
FMT_CONSTEXPR void on_minute(numeric_system)
Definition: chrono.h:899
FMT_CONSTEXPR void on_utc_offset(numeric_system)
Definition: chrono.h:912
FMT_CONSTEXPR void on_dec_month(numeric_system)
Definition: chrono.h:890
FMT_CONSTEXPR void on_day_of_month_space(numeric_system)
Definition: chrono.h:896
FMT_CONSTEXPR void on_iso_time()
Definition: chrono.h:908
FMT_CONSTEXPR void on_datetime(numeric_system)
Definition: chrono.h:901
FMT_CONSTEXPR void on_offset_year()
Definition: chrono.h:880
FMT_CONSTEXPR void on_iso_week_of_year(numeric_system)
Definition: chrono.h:893
FMT_CONSTEXPR void on_abbr_month()
Definition: chrono.h:888
FMT_CONSTEXPR void on_second(numeric_system)
Definition: chrono.h:900
FMT_CONSTEXPR void on_full_weekday()
Definition: chrono.h:885
FMT_CONSTEXPR void on_iso_week_based_short_year()
Definition: chrono.h:883
FMT_CONSTEXPR void on_dec0_week_of_year(numeric_system)
Definition: chrono.h:891
FMT_CONSTEXPR void on_us_date()
Definition: chrono.h:904
FMT_CONSTEXPR void on_short_year(numeric_system)
Definition: chrono.h:879
FMT_CONSTEXPR void on_tz_name()
Definition: chrono.h:913
FMT_CONSTEXPR void on_12_hour_time()
Definition: chrono.h:906
FMT_CONSTEXPR void on_year(numeric_system)
Definition: chrono.h:878
FMT_CONSTEXPR void on_dec1_week_of_year(numeric_system)
Definition: chrono.h:892
FMT_CONSTEXPR void on_full_month()
Definition: chrono.h:889
FMT_CONSTEXPR void unsupported()
Definition: chrono.h:875
FMT_CONSTEXPR void on_loc_time(numeric_system)
Definition: chrono.h:903
FMT_CONSTEXPR void on_am_pm()
Definition: chrono.h:909
FMT_CONSTEXPR void on_abbr_weekday()
Definition: chrono.h:884
FMT_CONSTEXPR void on_iso_week_based_year()
Definition: chrono.h:882
FMT_CONSTEXPR void on_24_hour(numeric_system)
Definition: chrono.h:897
auto format(wformat_string< T... > fmt, T &&... args) -> std::wstring
Definition: xchar.h:108
auto format_to(OutputIt out, const S &fmt, T &&... args) -> OutputIt
Definition: xchar.h:156