Commit Graph

23 Commits

Author SHA1 Message Date
Victor Zverovich
78daa50ffc Fix handling of chrono durations with minimal signed rep 2019-06-01 09:36:37 -07:00
Victor Zverovich
d07cc2026b FMT_EXPLICIT -> explicit, FMT_NULL -> nullptr 2019-05-30 07:42:36 -07:00
Victor Zverovich
30bce6c14c Fix a few chrono formatting corner cases (#1178) 2019-05-29 18:02:26 -07:00
Victor Zverovich
de5da50910 Fix formatting of extreme durations (#1154) 2019-05-11 08:42:02 -07:00
Victor Zverovich
e9bab6d028 Improve handling of large durations 2019-05-08 12:40:33 -07:00
Victor Zverovich
ca978b3d21 Fix handling of nan durations 2019-05-05 08:53:23 -07:00
Victor Zverovich
c1d430e61a Improve handling of negative durations 2019-05-04 17:52:20 -07:00
Victor Zverovich
38a85502ed Use the same rep type for seconds to prevent overflow 2019-05-04 09:22:09 -07:00
Paul Dreik
b3cc9c0567 Merge remote-tracking branch 'upstream/master' into invalidcolons
# Conflicts:
#	test/chrono-test.cc
2019-04-28 21:35:21 +02:00
Paul Dreik
2e3352fd05 provoke assertion
fmt/include/fmt/core.h:246:
typename std::make_unsigned<_Tp>::type fmt::v5::internal::to_unsigned(Int)
[with Int = long int;
 typename std::make_unsigned<_Tp>::type = long unsigned int]:
Assertion `(value >= 0) && "negative value"' failed.
2019-04-28 21:34:09 +02:00
Victor Zverovich
4c721e3a2f Fix chrono formatting with invalid argument id (#1132) 2019-04-28 07:08:41 -07:00
Victor Zverovich
dd6cc0e6ac Merge time-test into chrono-test 2019-03-14 18:10:56 -07:00
Victor Zverovich
355eb6d29a Enable grisu for shortest roundtrip (default) formatting 2019-02-03 10:38:28 -08:00
Daniela Engert
0700612249 Implement 'chrono' formatting specifiers '%Q' and '%q'
Howard Hinnant's 'date' library recently gained these two new formatting specifiers. This implementation in {fmt} includes support for 'std::chrono::duration' specializations with floating-point representation types and user-definable precision.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-01-27 11:10:08 -08:00
Daniela Engert
9f70b034e1 Implement precision for floating-point durations.
The formatting syntax follows p1361r0, augmented by a precision field as proposed in #1004.

Signed-off-by: Daniela Engert <dani@ngrt.de>
2019-01-23 07:17:00 -08:00
Victor Zverovich
fdd8e333c1 Fix compilation with locales disabled (#1011) 2019-01-19 07:16:05 -08:00
Victor Zverovich
58b6f8db48 Format the code using clang-format 2019-01-13 06:58:20 -08:00
Victor Zverovich
dc8f8ce4c0 Fix handling of dynamic width in chrono formatter
Thanks to Howard Hinnant.
2019-01-09 15:23:21 -08:00
Victor Zverovich
77a7244804 Implement fill/align/width for strftime-like formatting 2018-12-19 07:03:02 -08:00
Victor Zverovich
3e01376e08 Implement fill/align/width parsing in chrono formatter 2018-12-16 09:08:11 -08:00
Victor Zverovich
b180b39152 Fix default formatting 2018-12-12 06:39:47 -08:00
Victor Zverovich
b0f2224719 Implement default chrono formatting 2018-12-09 15:56:15 -08:00
Victor Zverovich
f54f3d0fb7 Move chrono-specific code to a separate header 2018-12-09 06:45:20 -08:00