20# include <type_traits>
27 template <
typename Duration,
typename T>
29 -> std::chrono::time_point<std::chrono::system_clock, Duration> {
37template <
typename... T>
inline void _tzset(T...) {}
43#ifndef FMT_SAFE_DURATION_CAST
44# define FMT_SAFE_DURATION_CAST 1
46#if FMT_SAFE_DURATION_CAST
54namespace safe_duration_cast {
56template <
typename To,
typename From,
58 std::numeric_limits<From>::is_signed ==
59 std::numeric_limits<To>::is_signed)>
63 using F = std::numeric_limits<From>;
64 using T = std::numeric_limits<To>;
65 static_assert(F::is_integer,
"From must be integral");
66 static_assert(T::is_integer,
"To must be integral");
73 if (
from < (T::min)() ||
from > (T::max)()) {
79 return static_cast<To
>(
from);
84template <
typename To,
typename From,
86 std::numeric_limits<From>::is_signed !=
87 std::numeric_limits<To>::is_signed)>
91 using F = std::numeric_limits<From>;
92 using T = std::numeric_limits<To>;
93 static_assert(F::is_integer,
"From must be integral");
94 static_assert(T::is_integer,
"To must be integral");
98 if (fmt::detail::is_negative(
from)) {
111 F::digits >= T::digits) &&
116 return static_cast<To
>(
from);
119template <
typename To,
typename From,
141template <
typename To,
typename From,
145 using T = std::numeric_limits<To>;
146 static_assert(std::is_floating_point<From>::value,
"From must be floating");
147 static_assert(std::is_floating_point<To>::value,
"To must be floating");
150 if (std::isfinite(
from)) {
151 if (
from >= T::lowest() &&
from <= (T::max)()) {
152 return static_cast<To
>(
from);
160 return static_cast<To
>(
from);
163template <
typename To,
typename From,
167 static_assert(std::is_floating_point<From>::value,
"From must be floating");
172template <
typename To,
typename FromRep,
typename FromPeriod,
174 FMT_ENABLE_IF(std::is_floating_point<typename To::rep>::value)>
175auto safe_duration_cast(std::chrono::duration<FromRep, FromPeriod>
from,
177 using From = std::chrono::duration<FromRep, FromPeriod>;
179 if (std::isnan(
from.count())) {
181 return To{std::numeric_limits<typename To::rep>::quiet_NaN()};
187 if (std::isinf(
from.count())) {
188 return To{
from.count()};
194 : std::ratio_divide<typename From::period, typename To::period> {};
196 static_assert(Factor::num > 0,
"num must be positive");
197 static_assert(Factor::den > 0,
"den must be positive");
203 using IntermediateRep =
204 typename std::common_type<
typename From::rep,
typename To::rep,
205 decltype(Factor::num)>::type;
209 IntermediateRep count =
210 safe_float_conversion<IntermediateRep>(
from.count(), ec);
218 static_cast<IntermediateRep
>(Factor::num);
223 constexpr auto min1 = std::numeric_limits<IntermediateRep>::lowest() /
224 static_cast<IntermediateRep
>(Factor::num);
229 count *=
static_cast<IntermediateRep
>(Factor::num);
234 using common_t =
typename std::common_type<IntermediateRep, intmax_t>::type;
235 count /=
static_cast<common_t
>(Factor::den);
239 using ToRep =
typename To::rep;
241 const ToRep tocount = safe_float_conversion<ToRep>(count, ec);
253#ifdef FMT_USE_UTC_TIME
255#elif defined(__cpp_lib_chrono)
256# define FMT_USE_UTC_TIME (__cpp_lib_chrono >= 201907L)
258# define FMT_USE_UTC_TIME 0
261using utc_clock = std::chrono::utc_clock;
269#ifdef FMT_USE_LOCAL_TIME
271#elif defined(__cpp_lib_chrono)
272# define FMT_USE_LOCAL_TIME (__cpp_lib_chrono >= 201907L)
274# define FMT_USE_LOCAL_TIME 0
276#if FMT_USE_LOCAL_TIME
277using local_t = std::chrono::local_t;
284template <
typename Duration>
285using sys_time = std::chrono::time_point<std::chrono::system_clock, Duration>;
287template <
typename Duration>
288using utc_time = std::chrono::time_point<detail::utc_clock, Duration>;
290template <
class Duration>
291using local_time = std::chrono::time_point<detail::local_t, Duration>;
299template <
typename T =
void>
struct null {};
307template <
typename StreamBuf>
class formatbuf :
public StreamBuf {
309 using char_type =
typename StreamBuf::char_type;
310 using streamsize =
decltype(std::declval<StreamBuf>().sputn(
nullptr, 0));
311 using int_type =
typename StreamBuf::int_type;
312 using traits_type =
typename StreamBuf::traits_type;
327 if (!traits_type::eq_int_type(ch, traits_type::eof()))
328 buffer_.
push_back(
static_cast<char_type
>(ch));
332 auto xsputn(
const char_type* s, streamsize
count) -> streamsize
override {
339 static const auto&
locale = std::locale::classic();
349template <
typename CodeUnit>
351 const std::locale& loc) {
354 auto& f = std::use_facet<std::codecvt<CodeUnit, char, std::mbstate_t>>(loc);
356 auto mb = std::mbstate_t();
357 const char* from_next =
nullptr;
358 auto result = f.in(mb, in.begin(), in.end(), from_next, std::begin(out.buf),
359 std::end(out.buf), out.end);
360 if (result != std::codecvt_base::ok)
361 FMT_THROW(format_error(
"failed to format time"));
364template <
typename OutputIt>
370#if FMT_MSC_VERSION != 0 || \
371 (defined(__GLIBCXX__) && \
372 (!defined(_GLIBCXX_USE_DUAL_ABI) || _GLIBCXX_USE_DUAL_ABI == 0))
375 using code_unit = wchar_t;
377 using code_unit = char32_t;
386 if (!u.convert({unit.buf, to_unsigned(unit.end - unit.buf)}))
387 FMT_THROW(format_error(
"failed to format time"));
388 return copy<char>(u.c_str(), u.c_str() + u.size(), out);
390 return copy<char>(in.data(), in.data() + in.size(), out);
393template <
typename Char,
typename OutputIt,
402template <
typename Char,
typename OutputIt,
409template <
typename Char>
411 const std::locale& loc,
char format,
char modifier) {
413 auto&& os = std::basic_ostream<Char>(&format_buf);
415 const auto& facet = std::use_facet<std::time_put<Char>>(loc);
416 auto end = facet.put(os, os, Char(
' '), &time,
format, modifier);
417 if (end.failed())
FMT_THROW(format_error(
"failed to format time"));
420template <
typename Char,
typename OutputIt,
422auto write(OutputIt out,
const std::tm& time,
const std::locale& loc,
423 char format,
char modifier = 0) -> OutputIt {
429template <
typename Char,
typename OutputIt,
431auto write(OutputIt out,
const std::tm& time,
const std::locale& loc,
432 char format,
char modifier = 0) -> OutputIt {
438template <
typename Rep1,
typename Rep2>
440 :
public std::integral_constant<bool,
441 (std::is_integral<Rep1>::value &&
442 std::is_integral<Rep2>::value) ||
443 (std::is_floating_point<Rep1>::value &&
444 std::is_floating_point<Rep2>::value)> {
448 FMT_THROW(format_error(
"cannot format duration"));
452template <
typename To,
typename FromRep,
typename FromPeriod,
454 std::is_integral<typename To::rep>::value)>
456#if !FMT_SAFE_DURATION_CAST
457 return std::chrono::duration_cast<To>(
from);
460 using factor = std::ratio_divide<FromPeriod, typename To::period>;
462 using common_rep =
typename std::common_type<FromRep,
typename To::rep,
463 decltype(factor::num)>::type;
466 auto count = safe_duration_cast::lossless_integral_conversion<common_rep>(
473 const auto min = (std::numeric_limits<common_rep>::min)() / factor::num;
476 count *= factor::num;
480 To(safe_duration_cast::lossless_integral_conversion<typename To::rep>(
487template <
typename To,
typename FromRep,
typename FromPeriod,
489 std::is_floating_point<typename To::rep>::value)>
491#if FMT_SAFE_DURATION_CAST
495 To to = safe_duration_cast::safe_duration_cast<To>(
from, ec);
500 return std::chrono::duration_cast<To>(
from);
505 typename To,
typename FromRep,
typename FromPeriod,
506 FMT_ENABLE_IF(!is_same_arithmetic_type<FromRep, typename To::rep>::value)>
509 return std::chrono::duration_cast<To>(
from);
512template <
typename Duration>
518 time_point.time_since_epoch())
525 using namespace std::chrono;
543 inline dispatcher(std::time_t t) : time_(t) {}
545 inline auto run() ->
bool {
546 using namespace fmt::detail;
547 return handle(localtime_r(&time_, &tm_));
550 inline auto handle(std::tm* tm) ->
bool {
return tm !=
nullptr; }
553 using namespace fmt::detail;
554 return fallback(localtime_s(&tm_, &time_));
557 inline auto fallback(
int res) ->
bool {
return res == 0; }
561 using namespace fmt::detail;
562 std::tm* tm = std::localtime(&time_);
564 return tm !=
nullptr;
570 if (!lt.run())
FMT_THROW(format_error(
"time_t value out of range"));
574#if FMT_USE_LOCAL_TIME
575template <
typename Duration,
577inline auto localtime(std::chrono::local_time<Duration> time) -> std::tm {
578 using namespace std::chrono;
589inline auto gmtime(std::time_t time) -> std::tm {
594 inline dispatcher(std::time_t t) : time_(t) {}
596 inline auto run() ->
bool {
597 using namespace fmt::detail;
598 return handle(gmtime_r(&time_, &tm_));
601 inline auto handle(std::tm* tm) ->
bool {
return tm !=
nullptr; }
604 using namespace fmt::detail;
605 return fallback(gmtime_s(&tm_, &time_));
608 inline auto fallback(
int res) ->
bool {
return res == 0; }
612 std::tm* tm = std::gmtime(&time_);
614 return tm !=
nullptr;
618 auto gt = dispatcher(time);
620 if (!gt.run())
FMT_THROW(format_error(
"time_t value out of range"));
624template <
typename Duration>
635 unsigned c,
char sep) {
636 unsigned long long digits =
637 a | (b << 24) | (static_cast<unsigned long long>(c) << 48);
647 digits += (((digits * 205) >> 11) & 0x000f00000f00000f) * 6;
649 digits = ((digits & 0x00f00000f00000f0) >> 4) |
650 ((digits & 0x000f00000f00000f) << 8);
651 auto usep =
static_cast<unsigned long long>(sep);
653 digits |= 0x3030003030003030 | (usep << 16) | (usep << 40);
655 constexpr const size_t len = 8;
658 std::memcpy(tmp, &digits, len);
659 std::reverse_copy(tmp, tmp + len, buf);
661 std::memcpy(buf, &digits, len);
665template <
typename Period>
667 if (std::is_same<Period, std::atto>::value)
return "as";
668 if (std::is_same<Period, std::femto>::value)
return "fs";
669 if (std::is_same<Period, std::pico>::value)
return "ps";
670 if (std::is_same<Period, std::nano>::value)
return "ns";
671 if (std::is_same<Period, std::micro>::value)
673 if (std::is_same<Period, std::milli>::value)
return "ms";
674 if (std::is_same<Period, std::centi>::value)
return "cs";
675 if (std::is_same<Period, std::deci>::value)
return "ds";
676 if (std::is_same<Period, std::ratio<1>>
::value)
return "s";
677 if (std::is_same<Period, std::deca>::value)
return "das";
678 if (std::is_same<Period, std::hecto>::value)
return "hs";
679 if (std::is_same<Period, std::kilo>::value)
return "ks";
680 if (std::is_same<Period, std::mega>::value)
return "Ms";
681 if (std::is_same<Period, std::giga>::value)
return "Gs";
682 if (std::is_same<Period, std::tera>::value)
return "Ts";
683 if (std::is_same<Period, std::peta>::value)
return "Ps";
684 if (std::is_same<Period, std::exa>::value)
return "Es";
685 if (std::is_same<Period, std::ratio<60>>
::value)
return "min";
686 if (std::is_same<Period, std::ratio<3600>>
::value)
return "h";
687 if (std::is_same<Period, std::ratio<86400>>
::value)
return "d";
707template <
typename OutputIt>
713template <
typename OutputIt>
720template <
typename Char,
typename Handler>
722 Handler&& handler) ->
const Char* {
723 if (begin == end || *begin ==
'}')
return begin;
724 if (*begin !=
'%')
FMT_THROW(format_error(
"invalid format"));
734 if (begin !=
ptr) handler.on_text(begin,
ptr);
736 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
748 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
751 case '%': handler.on_text(
ptr - 1,
ptr);
break;
753 const Char newline[] = {
'\n'};
754 handler.on_text(newline, newline + 1);
758 const Char tab[] = {
'\t'};
759 handler.on_text(tab, tab + 1);
766 case 'G': handler.on_iso_week_based_year();
break;
767 case 'g': handler.on_iso_week_based_short_year();
break;
769 case 'a': handler.on_abbr_weekday();
break;
770 case 'A': handler.on_full_weekday();
break;
775 case 'h': handler.on_abbr_month();
break;
776 case 'B': handler.on_full_month();
break;
786 case 'j': handler.on_day_of_year(pad);
break;
800 case 'D': handler.on_us_date();
break;
801 case 'F': handler.on_iso_date();
break;
802 case 'r': handler.on_12_hour_time();
break;
803 case 'R': handler.on_24_hour_time();
break;
804 case 'T': handler.on_iso_time();
break;
805 case 'p': handler.on_am_pm();
break;
806 case 'Q': handler.on_duration_value();
break;
807 case 'q': handler.on_duration_unit();
break;
809 case 'Z': handler.on_tz_name();
break;
812 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
816 case 'y': handler.on_offset_year();
break;
822 default:
FMT_THROW(format_error(
"invalid format"));
827 if (
ptr == end)
FMT_THROW(format_error(
"invalid format"));
854 default:
FMT_THROW(format_error(
"invalid format"));
857 default:
FMT_THROW(format_error(
"invalid format"));
861 if (begin !=
ptr) handler.on_text(begin,
ptr);
919 template <
typename Char>
957 static constexpr const char* full_name_list[] = {
958 "Sunday",
"Monday",
"Tuesday",
"Wednesday",
959 "Thursday",
"Friday",
"Saturday"};
960 return wday >= 0 && wday <= 6 ? full_name_list[wday] :
"?";
963 static constexpr const char* short_name_list[] = {
"Sun",
"Mon",
"Tue",
"Wed",
964 "Thu",
"Fri",
"Sat"};
965 return wday >= 0 && wday <= 6 ? short_name_list[wday] :
"???";
969 static constexpr const char* full_name_list[] = {
970 "January",
"February",
"March",
"April",
"May",
"June",
971 "July",
"August",
"September",
"October",
"November",
"December"};
972 return mon >= 0 && mon <= 11 ? full_name_list[mon] :
"?";
975 static constexpr const char* short_name_list[] = {
976 "Jan",
"Feb",
"Mar",
"Apr",
"May",
"Jun",
977 "Jul",
"Aug",
"Sep",
"Oct",
"Nov",
"Dec",
979 return mon >= 0 && mon <= 11 ? short_name_list[mon] :
"???";
982template <
typename T,
typename =
void>
988template <
typename T,
typename =
void>
995 static bool init = []() {
1004template <
typename T,
typename Int, FMT_ENABLE_IF(std::is_
integral<T>::value)>
1006 if (!std::is_unsigned<Int>::value &&
1008 FMT_THROW(fmt::format_error(
"chrono value is out of range"));
1010 return static_cast<Int
>(
value);
1012template <
typename T,
typename Int, FMT_ENABLE_IF(!std::is_
integral<T>::value)>
1014 auto int_value =
static_cast<Int
>(
value);
1015 if (int_value < 0 || value >
static_cast<T
>(upper))
1016 FMT_THROW(format_error(
"invalid value"));
1020constexpr auto pow10(std::uint32_t n) ->
long long {
1021 return n == 0 ? 1 : 10 *
pow10(n - 1);
1027template <
long long Num,
long long Den,
int N = 0,
1028 bool Enabled = (N < 19) && (Num <= max_value<long long>() / 10)>
1036template <
long long Num,
long long Den,
int N>
1038 static constexpr int value = (Num % Den == 0) ? N : 6;
1043template <
typename Char,
typename OutputIt,
typename Duration>
1045 constexpr auto num_fractional_digits =
1047 Duration::period::den>
::value;
1049 using subsecond_precision = std::chrono::duration<
1050 typename std::common_type<
typename Duration::rep,
1051 std::chrono::seconds::rep>
::type,
1052 std::ratio<1,
pow10(num_fractional_digits)>>;
1055 const auto subseconds =
1056 std::chrono::treat_as_floating_point<
1057 typename subsecond_precision::rep>
::value
1058 ? fractional.count()
1063 int leading_zeroes = (std::max)(0, num_fractional_digits - num_digits);
1065 FMT_ASSERT(!std::is_floating_point<typename Duration::rep>::value,
"");
1066 if (std::ratio_less<
typename subsecond_precision::period,
1067 std::chrono::seconds::period>
::value) {
1075 int remaining =
precision - leading_zeroes;
1077 if (remaining < num_digits) {
1078 int num_truncated_digits = num_digits - remaining;
1085 remaining -= num_digits;
1094template <
typename Duration>
1096 int num_fractional_digits = -1) {
1097 using rep =
typename Duration::rep;
1098 FMT_ASSERT(std::is_floating_point<rep>::value,
"");
1100 auto val = duration.count();
1102 if (num_fractional_digits < 0) {
1105 using namespace std;
1106 num_fractional_digits =
1108 Duration::period::den>
::value;
1109 if (num_fractional_digits < 6 &&
static_cast<rep
>(round(val)) != val)
1110 num_fractional_digits = 6;
1113 fmt::format_to(std::back_inserter(buf),
FMT_STRING(
"{:.{}f}"),
1114 std::fmod(val *
static_cast<rep
>(Duration::period::num) /
1115 static_cast<rep
>(Duration::period::den),
1116 static_cast<rep
>(60)),
1117 num_fractional_digits);
1120template <
typename OutputIt,
typename Char,
1121 typename Duration = std::chrono::seconds>
1124 static constexpr int days_per_week = 7;
1126 const std::locale& loc_;
1127 const bool is_classic_;
1129 const Duration* subsecs_;
1132 auto tm_sec()
const noexcept ->
int {
1133 FMT_ASSERT(tm_.tm_sec >= 0 && tm_.tm_sec <= 61,
"");
1136 auto tm_min()
const noexcept ->
int {
1137 FMT_ASSERT(tm_.tm_min >= 0 && tm_.tm_min <= 59,
"");
1140 auto tm_hour()
const noexcept ->
int {
1141 FMT_ASSERT(tm_.tm_hour >= 0 && tm_.tm_hour <= 23,
"");
1144 auto tm_mday()
const noexcept ->
int {
1145 FMT_ASSERT(tm_.tm_mday >= 1 && tm_.tm_mday <= 31,
"");
1148 auto tm_mon()
const noexcept ->
int {
1149 FMT_ASSERT(tm_.tm_mon >= 0 && tm_.tm_mon <= 11,
"");
1152 auto tm_year()
const noexcept ->
long long {
return 1900ll + tm_.tm_year; }
1153 auto tm_wday()
const noexcept ->
int {
1154 FMT_ASSERT(tm_.tm_wday >= 0 && tm_.tm_wday <= 6,
"");
1157 auto tm_yday()
const noexcept ->
int {
1158 FMT_ASSERT(tm_.tm_yday >= 0 && tm_.tm_yday <= 365,
"");
1162 auto tm_hour12()
const noexcept ->
int {
1163 const auto h = tm_hour();
1164 const auto z = h < 12 ? h : h - 12;
1165 return z == 0 ? 12 : z;
1172 auto split_year_lower(
long long year)
const noexcept ->
int {
1173 auto l =
year % 100;
1175 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,
pad_type pad) {
1231 bool negative =
year < 0;
1239 if (
width > num_digits) {
1246 write_year_extended(
year, pad);
1257 write2(
static_cast<int>(offset / 60));
1259 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)
1271 _get_timezone(&offset);
1274 _get_dstbias(&dstbias);
1277 write_utc_offset(-offset, ns);
1283 std::time_t gt = std::mktime(>m);
1284 std::tm ltm =
gmtime(gt);
1285 std::time_t lt = std::mktime(<m);
1286 long long offset = gt - lt;
1287 write_utc_offset(offset, ns);
1291 template <
typename T, FMT_ENABLE_IF(has_member_data_tm_zone<T>::value)>
1292 void format_tz_name_impl(
const T& tm) {
1296 format_localized(
'Z');
1298 template <
typename T, FMT_ENABLE_IF(!has_member_data_tm_zone<T>::value)>
1299 void format_tz_name_impl(
const T&) {
1300 format_localized(
'Z');
1303 void format_localized(
char format,
char modifier = 0) {
1308 tm_writer(
const std::locale& loc, OutputIt out,
const std::tm& tm,
1309 const Duration* subsecs =
nullptr)
1316 auto out() const -> OutputIt {
return out_; }
1326 format_localized(
'a');
1332 format_localized(
'A');
1336 format_localized(
'w',
'O');
1340 auto wday = tm_wday();
1341 write1(wday == 0 ? days_per_week : wday);
1343 format_localized(
'u',
'O');
1351 format_localized(
'b');
1357 format_localized(
'B');
1392 out_ =
copy<Char>(std::begin(buf), std::end(buf), out_);
1395 auto year = tm_year();
1408 out_ =
copy<Char>(std::begin(buf) + offset, std::end(buf), out_);
1416 return write_year(tm_year(), pad);
1417 format_localized(
'Y',
'E');
1421 return write2(split_year_lower(tm_year()));
1422 format_localized(
'y',
'O');
1425 if (is_classic_)
return write2(split_year_lower(tm_year()));
1426 format_localized(
'y',
'E');
1431 auto year = tm_year();
1432 auto upper =
year / 100;
1437 }
else if (upper >= 0 && upper < 100) {
1438 write2(
static_cast<int>(upper));
1443 format_localized(
'C',
'E');
1449 return write2(tm_mon() + 1, pad);
1450 format_localized(
'm',
'O');
1455 return write2((tm_yday() + days_per_week - tm_wday()) / days_per_week,
1457 format_localized(
'U',
'O');
1461 auto wday = tm_wday();
1462 write2((tm_yday() + days_per_week -
1463 (wday == 0 ? (days_per_week - 1) : (wday - 1))) /
1467 format_localized(
'W',
'O');
1472 return write2(tm_iso_week_of_year(), pad);
1473 format_localized(
'V',
'O');
1480 write2(split_year_lower(tm_iso_week_year()));
1484 auto yday = tm_yday() + 1;
1485 auto digit1 = yday / 100;
1491 write2(yday % 100, pad);
1496 return write2(tm_mday(), pad);
1497 format_localized(
'd',
'O');
1502 return write2(tm_hour(), pad);
1503 format_localized(
'H',
'O');
1507 return write2(tm_hour12(), pad);
1508 format_localized(
'I',
'O');
1512 return write2(tm_min(), pad);
1513 format_localized(
'M',
'O');
1518 write2(tm_sec(), pad);
1520 if (std::is_floating_point<typename Duration::rep>::value) {
1523 if (buf.size() > 1) {
1525 out_ =
copy<Char>(buf.begin() + 1, buf.end(), out_);
1533 format_localized(
'S',
'O');
1542 out_ =
copy<Char>(std::begin(buf), std::end(buf), out_);
1546 format_localized(
'r');
1562 *out_++ = tm_hour() < 12 ?
'A' :
'P';
1565 format_localized(
'p');
1579 template <
typename Char>
1592 FMT_THROW(format_error(
"precision not allowed for this argument type"));
1597template <
typename T,
1598 FMT_ENABLE_IF(std::is_integral<T>::value&& has_isfinite<T>::value)>
1603template <
typename T, FMT_ENABLE_IF(std::is_
integral<T>::value)>
1604inline auto mod(T x,
int y) -> T {
1605 return x %
static_cast<T
>(y);
1607template <
typename T, FMT_ENABLE_IF(std::is_
floating_po
int<T>::value)>
1608inline auto mod(T x,
int y) -> T {
1609 return std::fmod(x,
static_cast<T
>(y));
1614template <typename T, bool INTEGRAL = std::is_integral<T>::value>
1620 using type =
typename std::make_unsigned<T>::type;
1623template <
typename Rep,
typename Period,
1626 -> std::chrono::duration<Rep, std::milli> {
1629#if FMT_SAFE_DURATION_CAST
1630 using CommonSecondsType =
1631 typename std::common_type<
decltype(d), std::chrono::seconds>::type;
1633 const auto d_as_whole_seconds =
1636 const auto diff = d_as_common - d_as_whole_seconds;
1646template <
typename Char,
typename Rep,
typename OutputIt,
1652template <
typename Char,
typename Rep,
typename OutputIt,
1662template <
typename Char,
typename OutputIt>
1664 return copy<Char>(unit.begin(), unit.end(), out);
1667template <
typename OutputIt>
1675template <
typename Char,
typename Period,
typename OutputIt>
1695 bool has_locale_ =
false;
1700 ::new (&
locale_) std::locale(loc.template get<std::locale>());
1703 if (has_locale_)
locale_.~locale();
1705 inline operator const std::locale&()
const {
1710template <
typename FormatContext,
typename OutputIt,
typename Rep,
1731 std::chrono::duration<Rep, Period> d)
1736 if (d.count() < 0) {
1765 auto days() const -> Rep {
return static_cast<Rep
>(
s.count() / 86400); }
1767 return static_cast<Rep
>(
mod((
s.count() / 3600), 24));
1771 Rep
hour =
static_cast<Rep
>(
mod((
s.count() / 3600), 12));
1776 return static_cast<Rep
>(
mod((
s.count() / 60), 60));
1778 auto second() const -> Rep {
return static_cast<Rep
>(
mod(
s.count(), 60)); }
1781 auto time = std::tm();
1801 if (
width > num_digits) {
1811 template <
typename Callback,
typename... Args>
1886 if (std::is_floating_point<rep>::value) {
1891 if (buf.size() < 2 || buf[1] ==
'.') {
1898 out, std::chrono::duration<rep, Period>(
val),
precision);
1949#if defined(__cpp_lib_chrono) && __cpp_lib_chrono >= 201907
1950using weekday = std::chrono::weekday;
1951using day = std::chrono::day;
1952using month = std::chrono::month;
1953using year = std::chrono::year;
1959 unsigned char value_;
1964 : value_(
static_cast<unsigned char>(wd != 7 ? wd : 0)) {}
1965 constexpr auto c_encoding() const noexcept ->
unsigned {
return value_; }
1970 unsigned char value_;
1974 constexpr explicit day(
unsigned d) noexcept
1975 : value_(
static_cast<unsigned char>(d)) {}
1976 constexpr explicit operator unsigned() const noexcept {
return value_; }
1981 unsigned char value_;
1985 constexpr explicit month(
unsigned m) noexcept
1986 : value_(
static_cast<unsigned char>(m)) {}
1987 constexpr explicit operator unsigned() const noexcept {
return value_; }
1996 constexpr explicit year(
int y) noexcept : value_(y) {}
1997 constexpr explicit operator int() const noexcept {
return value_; }
2009 : year_(y), month_(m), day_(d) {}
2010 constexpr auto year() const noexcept -> fmt::
year {
return year_; }
2011 constexpr auto month() const noexcept -> fmt::
month {
return month_; }
2012 constexpr auto day() const noexcept -> fmt::
day {
return day_; }
2016template <
typename Char>
2019 bool localized_ =
false;
2020 bool use_tm_formatter_ =
false;
2024 auto it = ctx.begin(), end = ctx.end();
2025 if (it != end && *it ==
'L') {
2030 use_tm_formatter_ = it != end && *it !=
'}';
2034 template <
typename FormatContext>
2036 auto time = std::tm();
2037 time.tm_wday =
static_cast<int>(wd.c_encoding());
2041 w.on_abbr_weekday();
2046template <
typename Char>
2049 bool use_tm_formatter_ =
false;
2053 auto it = ctx.begin(), end = ctx.end();
2054 use_tm_formatter_ = it != end && *it !=
'}';
2058 template <
typename FormatContext>
2059 auto format(
day d, FormatContext& ctx)
const ->
decltype(ctx.out()) {
2060 auto time = std::tm();
2061 time.tm_mday =
static_cast<int>(
static_cast<unsigned>(d));
2070template <
typename Char>
2073 bool localized_ =
false;
2074 bool use_tm_formatter_ =
false;
2078 auto it = ctx.begin(), end = ctx.end();
2079 if (it != end && *it ==
'L') {
2084 use_tm_formatter_ = it != end && *it !=
'}';
2088 template <
typename FormatContext>
2089 auto format(
month m, FormatContext& ctx)
const ->
decltype(ctx.out()) {
2090 auto time = std::tm();
2091 time.tm_mon =
static_cast<int>(
static_cast<unsigned>(m)) - 1;
2100template <
typename Char>
2103 bool use_tm_formatter_ =
false;
2107 auto it = ctx.begin(), end = ctx.end();
2108 use_tm_formatter_ = it != end && *it !=
'}';
2112 template <
typename FormatContext>
2113 auto format(
year y, FormatContext& ctx)
const ->
decltype(ctx.out()) {
2114 auto time = std::tm();
2115 time.tm_year =
static_cast<int>(y) - 1900;
2124template <
typename Char>
2127 bool use_tm_formatter_ =
false;
2131 auto it = ctx.begin(), end = ctx.end();
2132 use_tm_formatter_ = it != end && *it !=
'}';
2136 template <
typename FormatContext>
2138 ->
decltype(ctx.out()) {
2139 auto time = std::tm();
2140 time.tm_year =
static_cast<int>(val.year()) - 1900;
2141 time.tm_mon =
static_cast<int>(
static_cast<unsigned>(val.month())) - 1;
2142 time.tm_mday =
static_cast<int>(
static_cast<unsigned>(val.day()));
2151template <
typename Rep,
typename Period,
typename Char>
2157 bool localized_ =
false;
2162 auto it = ctx.begin(), end = ctx.end();
2163 if (it == end || *it ==
'}')
return it;
2166 if (it == end)
return it;
2169 if ((c >=
'0' && c <=
'9') || c ==
'{') {
2171 if (it == end)
return it;
2176 checker.has_precision_integral = !std::is_floating_point<Rep>::value;
2179 if (it != end && *it ==
'L') {
2188 template <
typename FormatContext>
2189 auto format(std::chrono::duration<Rep, Period> d, FormatContext& ctx)
const
2190 ->
decltype(ctx.out()) {
2191 auto specs = specs_;
2192 auto precision = specs.precision;
2193 specs.precision = -1;
2194 auto begin = fmt_.
begin(), end = fmt_.
end();
2202 precision_ref_, ctx);
2203 if (begin == end || *begin ==
'}') {
2207 using chrono_formatter =
2209 auto f = chrono_formatter(ctx, out, d);
2227 template <
typename Duration,
typename FormatContext>
2229 const Duration* subsecs)
const ->
decltype(ctx.out()) {
2230 auto specs = specs_;
2236 auto loc_ref = ctx.locale();
2247 auto it = ctx.begin(), end = ctx.end();
2248 if (it == end || *it ==
'}')
return it;
2251 if (it == end)
return it;
2254 if ((c >=
'0' && c <=
'9') || c ==
'{') {
2256 if (it == end)
return it;
2265 template <
typename FormatContext>
2266 auto format(
const std::tm& tm, FormatContext& ctx)
const
2267 ->
decltype(ctx.out()) {
2268 return do_format<std::chrono::seconds>(tm, ctx,
nullptr);
2272template <
typename Char,
typename Duration>
2278 template <
typename FormatContext>
2280 ->
decltype(ctx.out()) {
2281 std::tm tm =
gmtime(val);
2282 using period =
typename Duration::period;
2284 period::num == 1 && period::den == 1 &&
2285 !std::is_floating_point<typename Duration::rep>::value)) {
2288 Duration epoch = val.time_since_epoch();
2291 if (subsecs.count() < 0) {
2296 tm =
gmtime(val - second);
2303template <
typename Duration,
typename Char>
2306 template <
typename FormatContext>
2308 ->
decltype(ctx.out()) {
2314template <
typename Duration,
typename Char>
2320 template <
typename FormatContext>
2322 ->
decltype(ctx.out()) {
2323 using period =
typename Duration::period;
2324 if (period::num == 1 && period::den == 1 &&
2325 !std::is_floating_point<typename Duration::rep>::value) {
2328 auto epoch = val.time_since_epoch();
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 and nanopb were all modified for use in 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:141
A dynamically growing memory buffer for trivially copyable/constructible types with the first SIZE el...
Definition format.h:790
constexpr auto end() const noexcept -> iterator
Definition base.h:552
constexpr auto begin() const noexcept -> iterator
Definition base.h:551
FMT_CONSTEXPR auto locale() const -> detail::locale_ref
Definition base.h:2645
constexpr day(unsigned d) noexcept
Definition chrono.h:1974
A contiguous memory buffer with an optional growing ability.
Definition base.h:1698
FMT_CONSTEXPR20 void append(const U *begin, const U *end)
Appends data to the end of the buffer.
Definition base.h:1780
FMT_CONSTEXPR void push_back(const T &value)
Definition base.h:1767
get_locale(bool localized, locale_ref loc)
Definition chrono.h:1698
std::locale locale_
Definition chrono.h:1693
~get_locale()
Definition chrono.h:1702
void on_offset_year()
Definition chrono.h:1424
void on_12_hour_time()
Definition chrono.h:1537
void on_dec0_week_of_year(numeric_system ns, pad_type pad)
Definition chrono.h:1453
void on_abbr_month()
Definition chrono.h:1347
void on_iso_date()
Definition chrono.h:1394
void on_iso_week_based_year()
Definition chrono.h:1476
void on_dec_month(numeric_system ns, pad_type pad)
Definition chrono.h:1447
void on_abbr_weekday()
Definition chrono.h:1322
void on_am_pm()
Definition chrono.h:1560
void on_dec0_weekday(numeric_system ns)
Definition chrono.h:1334
tm_writer(const std::locale &loc, OutputIt out, const std::tm &tm, const Duration *subsecs=nullptr)
Definition chrono.h:1308
void on_us_date()
Definition chrono.h:1387
void on_iso_time()
Definition chrono.h:1554
void on_duration_unit()
Definition chrono.h:1571
void on_24_hour_time()
Definition chrono.h:1549
void on_second(numeric_system ns, pad_type pad)
Definition chrono.h:1516
void on_full_weekday()
Definition chrono.h:1328
void on_12_hour(numeric_system ns, pad_type pad)
Definition chrono.h:1505
FMT_CONSTEXPR void on_text(const Char *begin, const Char *end)
Definition chrono.h:1318
void on_loc_time(numeric_system ns)
Definition chrono.h:1381
auto out() const -> OutputIt
Definition chrono.h:1316
void on_day_of_month(numeric_system ns, pad_type pad)
Definition chrono.h:1494
void on_tz_name()
Definition chrono.h:1412
void on_day_of_year(pad_type pad)
Definition chrono.h:1483
void on_short_year(numeric_system ns)
Definition chrono.h:1419
void on_iso_week_based_short_year()
Definition chrono.h:1479
void on_century(numeric_system ns)
Definition chrono.h:1429
void on_dec1_week_of_year(numeric_system ns, pad_type pad)
Definition chrono.h:1459
void on_minute(numeric_system ns, pad_type pad)
Definition chrono.h:1510
void on_dec1_weekday(numeric_system ns)
Definition chrono.h:1338
void on_year(numeric_system ns, pad_type pad)
Definition chrono.h:1414
void on_loc_date(numeric_system ns)
Definition chrono.h:1375
void on_full_month()
Definition chrono.h:1353
void on_utc_offset(numeric_system ns)
Definition chrono.h:1411
void on_duration_value()
Definition chrono.h:1570
void on_24_hour(numeric_system ns, pad_type pad)
Definition chrono.h:1500
void on_datetime(numeric_system ns)
Definition chrono.h:1360
void on_iso_week_of_year(numeric_system ns, pad_type pad)
Definition chrono.h:1470
auto size() const -> size_t
Definition format.h:1281
auto c_str() const -> const wchar_t *
Definition format.h:1282
constexpr month(unsigned m) noexcept
Definition chrono.h:1985
Parsing context consisting of a format string range being parsed and an argument counter for automati...
Definition base.h:845
constexpr auto c_encoding() const noexcept -> unsigned
Definition chrono.h:1965
constexpr weekday(unsigned wd) noexcept
Definition chrono.h:1963
constexpr auto year() const noexcept -> fmt::year
Definition chrono.h:2010
constexpr year_month_day(const year &y, const month &m, const day &d) noexcept
Definition chrono.h:2008
constexpr auto month() const noexcept -> fmt::month
Definition chrono.h:2011
constexpr auto day() const noexcept -> fmt::day
Definition chrono.h:2012
constexpr year(int y) noexcept
Definition chrono.h:1996
#define FMT_NOMACRO
Definition chrono.h:297
FMT_BEGIN_EXPORT auto localtime(std::time_t time) -> std::tm
Converts given time since epoch as std::time_t value into calendar time, expressed in local time.
Definition chrono.h:538
std::chrono::time_point< detail::utc_clock, Duration > utc_time
Definition chrono.h:288
std::chrono::time_point< std::chrono::system_clock, Duration > sys_time
Definition chrono.h:285
std::chrono::time_point< detail::local_t, Duration > local_time
Definition chrono.h:291
auto gmtime(std::time_t time) -> std::tm
Converts given time since epoch as std::time_t value into calendar time, expressed in Coordinated Uni...
Definition chrono.h:589
detail namespace with internal helper functions
Definition input_adapters.h:32
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:994
auto get_iterator(Buf &buf, OutputIt) -> decltype(buf.out())
Definition base.h:2044
FMT_CONSTEXPR20 auto isfinite(T value) -> bool
Definition format.h:2486
auto tm_mon_short_name(int mon) -> const char *
Definition chrono.h:974
void write_floating_seconds(memory_buffer &buf, Duration duration, int num_fractional_digits=-1)
Definition chrono.h:1095
FMT_CONSTEXPR void ignore_unused(const T &...)
Definition base.h:348
FMT_CONSTEXPR auto parse_precision(const Char *begin, const Char *end, format_specs &specs, arg_ref< Char > &precision_ref, parse_context< Char > &ctx) -> const Char *
Definition base.h:1387
FMT_CONSTEXPR auto get_units() -> const char *
Definition chrono.h:666
auto is_big_endian() -> bool
Definition format.h:270
FMT_CONSTEXPR auto write(OutputIt out, Char value, const format_specs &specs, locale_ref loc={}) -> OutputIt
Definition format.h:1824
pad_type
Definition chrono.h:698
auto duration_cast(std::chrono::duration< FromRep, FromPeriod > from) -> To
Definition chrono.h:455
auto localtime_s(...) -> null<>
Definition chrono.h:301
void write_fractional_seconds(OutputIt &out, Duration d, int precision=-1)
Definition chrono.h:1044
auto format_duration_unit(OutputIt out) -> OutputIt
Definition chrono.h:1676
constexpr auto max_value() -> T
Definition format.h:407
@ value
the parser finished reading a JSON value
FMT_CONSTEXPR auto to_unsigned(Int value) -> make_unsigned_t< Int >
Definition base.h:422
numeric_system
Definition chrono.h:691
auto write_encoded_tm_str(OutputIt out, string_view in, const std::locale &loc) -> OutputIt
Definition chrono.h:365
void do_write(buffer< Char > &buf, const std::tm &time, const std::locale &loc, char format, char modifier)
Definition chrono.h:410
constexpr auto pow10(std::uint32_t n) -> long long
Definition chrono.h:1020
auto tm_wday_short_name(int wday) -> const char *
Definition chrono.h:962
auto to_time_t(sys_time< Duration > time_point) -> std::time_t
Definition chrono.h:513
auto digits2(size_t value) -> const char *
Definition format.h:1008
auto get_classic_locale() -> const std::locale &
Definition chrono.h:338
FMT_CONSTEXPR auto fill_n(OutputIt out, Size count, const T &value) -> OutputIt
Definition format.h:532
auto mod(T x, int y) -> T
Definition chrono.h:1604
@ use_utf8
Definition base.h:442
void write_digit2_separated(char *buf, unsigned a, unsigned b, unsigned c, char sep)
Definition chrono.h:634
FMT_ALWAYS_INLINE constexpr auto const_check(T val) -> T
Definition base.h:367
void tzset_once()
Definition chrono.h:994
FMT_CONSTEXPR auto parse_width(const Char *begin, const Char *end, format_specs &specs, arg_ref< Char > &width_ref, parse_context< Char > &ctx) -> const Char *
Definition base.h:1378
FMT_NORETURN void throw_duration_error()
Definition chrono.h:447
auto get_milliseconds(std::chrono::duration< Rep, Period > d) -> std::chrono::duration< Rep, std::milli >
Definition chrono.h:1625
auto tm_mon_full_name(int mon) -> const char *
Definition chrono.h:968
FMT_CONSTEXPR20 auto copy(InputIt begin, InputIt end, OutputIt out) -> OutputIt
Definition base.h:1992
auto gmtime_r(...) -> null<>
Definition chrono.h:302
typename make_void< Ts... >::type void_t
Definition void_t.h:21
FMT_CONSTEXPR auto parse_align(const Char *begin, const Char *end, format_specs &specs) -> const Char *
Definition format.h:2184
auto to_nonnegative_int(T value, Int upper) -> Int
Definition chrono.h:1005
FMT_CONSTEXPR auto has_current_zone() -> bool
Definition chrono.h:524
auto copy_unit(string_view unit, OutputIt out, Char) -> OutputIt
Definition chrono.h:1663
auto write_padding(OutputIt out, pad_type pad, int width) -> OutputIt
Definition chrono.h:708
FMT_CONSTEXPR void handle_dynamic_spec(arg_id_kind kind, int &value, const arg_ref< typename Context::char_type > &ref, Context &ctx)
Definition format.h:3548
auto format_duration_value(OutputIt out, Rep val, int) -> OutputIt
Definition chrono.h:1648
type
Definition base.h:937
auto write_tm_str(OutputIt out, string_view sv, const std::locale &loc) -> OutputIt
Definition chrono.h:395
auto get_buffer(OutputIt out) -> iterator_buffer< OutputIt, T >
Definition base.h:2034
auto gmtime_s(...) -> null<>
Definition chrono.h:303
FMT_CONSTEXPR20 FMT_INLINE void write2digits(Char *out, size_t value)
Definition format.h:1178
constexpr auto count() -> int
Definition base.h:1028
FMT_CONSTEXPR20 auto count_digits(uint64_t n) -> int
Definition format.h:1068
auto tm_wday_full_name(int wday) -> const char *
Definition chrono.h:956
FMT_CONSTEXPR auto parse_chrono_format(const Char *begin, const Char *end, Handler &&handler) -> const Char *
Definition chrono.h:721
FMT_CONSTEXPR FMT_INLINE auto format_decimal(Char *out, UInt value, int num_digits) -> Char *
Definition format.h:1213
void write_codecvt(codecvt_result< CodeUnit > &out, string_view in, const std::locale &loc)
Definition chrono.h:350
constexpr auto isnan(T value) -> bool
Definition format.h:2473
void _tzset(T...)
Definition chrono.h:37
auto current_zone(T...) -> time_zone *
Definition chrono.h:33
Implement std::hash so that hash_code can be used in STL containers.
Definition PointerIntPair.h:280
static constexpr const size_t max_size
Definition chrono.h:344
CodeUnit * end
Definition chrono.h:346
CodeUnit buf[max_size]
Definition chrono.h:345
Definition format-inl.h:92
typename std::make_unsigned< T >::type type
Definition chrono.h:1620
T type
Definition chrono.h:1616
FMT_CONSTEXPR void on_dec0_weekday(numeric_system)
Definition chrono.h:877
FMT_CONSTEXPR void on_iso_week_of_year(numeric_system, pad_type)
Definition chrono.h:888
FMT_CONSTEXPR void on_iso_date()
Definition chrono.h:903
FMT_CONSTEXPR void on_loc_date(numeric_system)
Definition chrono.h:900
FMT_CONSTEXPR void on_day_of_year(pad_type)
Definition chrono.h:891
FMT_CONSTEXPR void on_duration_value()
Definition chrono.h:908
FMT_CONSTEXPR void on_dec1_weekday(numeric_system)
Definition chrono.h:878
FMT_CONSTEXPR void on_12_hour(numeric_system)
Definition chrono.h:896
FMT_CONSTEXPR void on_duration_unit()
Definition chrono.h:909
FMT_CONSTEXPR void on_24_hour_time()
Definition chrono.h:905
FMT_CONSTEXPR void on_century(numeric_system)
Definition chrono.h:872
FMT_CONSTEXPR void on_minute(numeric_system)
Definition chrono.h:897
FMT_CONSTEXPR void on_utc_offset(numeric_system)
Definition chrono.h:910
FMT_CONSTEXPR void on_day_of_month(numeric_system, pad_type)
Definition chrono.h:892
FMT_CONSTEXPR void on_dec_month(numeric_system, pad_type)
Definition chrono.h:881
FMT_CONSTEXPR void on_iso_time()
Definition chrono.h:906
FMT_CONSTEXPR void on_datetime(numeric_system)
Definition chrono.h:899
FMT_CONSTEXPR void on_offset_year()
Definition chrono.h:871
FMT_CONSTEXPR void on_abbr_month()
Definition chrono.h:879
FMT_CONSTEXPR void on_second(numeric_system)
Definition chrono.h:898
FMT_CONSTEXPR void on_full_weekday()
Definition chrono.h:876
FMT_CONSTEXPR void on_iso_week_based_short_year()
Definition chrono.h:874
FMT_CONSTEXPR void on_us_date()
Definition chrono.h:902
FMT_CONSTEXPR void on_year(numeric_system, pad_type)
Definition chrono.h:869
FMT_CONSTEXPR void on_short_year(numeric_system)
Definition chrono.h:870
FMT_CONSTEXPR void on_tz_name()
Definition chrono.h:911
FMT_CONSTEXPR void on_dec1_week_of_year(numeric_system, pad_type)
Definition chrono.h:885
FMT_CONSTEXPR void on_12_hour_time()
Definition chrono.h:904
FMT_CONSTEXPR void on_full_month()
Definition chrono.h:880
FMT_CONSTEXPR void unsupported()
Definition chrono.h:866
FMT_CONSTEXPR void on_dec0_week_of_year(numeric_system, pad_type)
Definition chrono.h:882
FMT_CONSTEXPR void on_loc_time(numeric_system)
Definition chrono.h:901
FMT_CONSTEXPR void on_am_pm()
Definition chrono.h:907
FMT_CONSTEXPR void on_abbr_weekday()
Definition chrono.h:875
FMT_CONSTEXPR void on_iso_week_based_year()
Definition chrono.h:873
FMT_CONSTEXPR void on_24_hour(numeric_system)
Definition chrono.h:895
auto to_sys(T) -> std::chrono::time_point< std::chrono::system_clock, Duration >
Definition chrono.h:28
#define FMT_ASSERT(condition, message)
Definition base.h:381
#define FMT_END_EXPORT
Definition base.h:250
#define FMT_PRAGMA_CLANG(x)
Definition base.h:230
basic_string_view< char > string_view
Definition base.h:603
constexpr auto min_of(T a, T b) -> T
Definition base.h:337
#define FMT_CONSTEXPR
Definition base.h:113
#define FMT_BEGIN_NAMESPACE
Definition base.h:239
#define FMT_ENABLE_IF(...)
Definition base.h:334
#define FMT_BEGIN_EXPORT
Definition base.h:249
#define FMT_NORETURN
Definition base.h:179
typename std::conditional< B, T, F >::type conditional_t
Definition base.h:299
#define FMT_END_NAMESPACE
Definition base.h:242