Victor Zverovich
f086dc0d27
Fix timezone handling in tm
2025-04-13 08:23:40 -07:00
Victor Zverovich
f10b6dd816
Improve chrono formatting
2025-04-12 09:59:06 -07:00
Victor Zverovich
b28214487d
Fix handling of %Z
2025-04-12 08:51:22 -07:00
Victor Zverovich
da776c9a66
Test timezone
2025-04-12 07:53:58 -07:00
Victor Zverovich
5f2e61fdd5
Cleanup chrono detail
2025-04-06 09:54:47 -07:00
Victor Zverovich
b3d45e1d3f
Remove fmt_detail
2025-04-06 09:24:20 -07:00
Victor Zverovich
e1ab383361
Report an error when timezone is not available
2025-03-29 09:10:00 -07:00
Victor Zverovich
443a8ef342
Deprecate fmt::localtime
2025-03-23 10:46:02 -07:00
Victor Zverovich
43e31614cc
Test ambiguous time
2025-03-23 10:34:37 -07:00
Marcel Breyer
bfbdc2be9a
Add parameter to the fallback to_sys function.
2025-01-11 08:48:20 -08:00
Edoardo Lolletti
3f864a4505
Address MSVC C4127 warning when formatting non unicode tm ( #4299 )
...
Use `const_check` to silence visual studio's W4 level diagnostic regarding conditional expressions being constants, addresses https://github.com/fmtlib/fmt/issues/4294
2025-01-08 14:21:48 -08:00
Yi Kong
4046f97278
Fix -Wmissing-noreturn warning ( #4194 )
...
Fixes warning reported by top of trunk Clang:
include/fmt/chrono.h:447:36: error: function 'throw_duration_error' could be declared with attribute 'noreturn'
2024-10-10 08:59:56 -07:00
Victor Zverovich
3faf6f181e
Add min_of/max_of
2024-09-29 10:24:39 -07:00
Cameron Angus
96dca569a1
Module linkage fixes for shared build ( #4169 )
...
* Mark some in-class defined member functions as explicitly inline/constexpr, to avoid missing external symbols when using fmt module with shared build due to modules not defaulting to implicit inline.
* Switch constexpr to inline for context::arg(string_view).
NOTE: Looks as if basic_format_args::get(string_view) could probably be made constexpr instead, but sticking with minimal change approach.
* Work around apparent non-conformance of older MSVC compilers.
* Switch format_int::str() from constexpr to inline to satisfy libstdc++ std::string constexpr limitations.
* Replace usages of macros for constexpr/inline with keywords.
* Fix for locations requiring C++14 constexpr.
* Further minor constexpr tweaks.
* Apply clang format
2024-09-26 07:53:55 -07:00
Paulo Assis
fe79932c26
Fix conversion warning on chrono.h ( #4170 )
...
* Fix conversion warning on chrono.h
warning: conversion from 'time_t' {aka 'long long int'} to 'long int' may change value [-Wconversion]
* Changing write_utc_offset to accept a long long instead of the static_cast as requested..
2024-09-20 16:47:27 -07:00
Victor Zverovich
6d43c755bc
Fix a typo
2024-09-19 10:49:11 -07:00
Khanh H
ed8f8be70d
More chrono padding ( #4161 )
...
* Add padding modifier to day of year, duration's remains unpadded
* Add padding modifier for %m, %Y
2024-09-18 09:27:45 -07:00
Victor Zverovich
538d8777e5
Workaround a bug in libstdc++
2024-09-14 07:49:10 -07:00
Victor Zverovich
0335312320
Demacrify UTF-8 check
2024-09-13 18:41:10 -07:00
Victor Zverovich
1782a6eac0
Rename pragma macros
2024-09-12 19:20:32 -07:00
Victor Zverovich
689ec7a087
Cleanup
2024-09-11 16:05:34 -07:00
Victor Zverovich
28143dc99d
Cleanup chrono
2024-09-11 15:41:51 -07:00
Victor Zverovich
6f62db098a
Cleanup format API
2024-09-11 07:26:11 -07:00
Victor Zverovich
5345cfe6b3
Adjust clang-format
2024-09-10 18:24:35 -07:00
Victor Zverovich
a6ecd25b80
Improve debug codegen
2024-09-02 06:54:45 -07:00
Victor Zverovich
8c4cfab57a
Detemplatize parse
2024-09-01 14:32:55 -07:00
Victor Zverovich
64a6c84592
basic_format_parse_context -> parse_context
2024-09-01 08:09:37 -07:00
Maxwell
e3676ca309
Change std::copy to detail::copy in chrono to fix MSVC compile errors ( #4132 )
2024-08-28 08:25:40 -07:00
Victor Zverovich
1a79bbfa83
Cleanup chrono formatting
2024-08-18 12:17:45 -07:00
Victor Zverovich
89af1ad77d
Cleanup chrono formatting
2024-08-18 11:55:33 -07:00
Victor Zverovich
0e741e0daa
Minor cleanup
2024-08-18 10:35:01 -07:00
Victor Zverovich
d1acc667c1
Minor cleanup
2024-08-18 09:33:29 -07:00
Victor Zverovich
4fb7008c90
Cleanup duration cast
2024-08-18 08:33:26 -07:00
Victor Zverovich
b906c321f0
Get rid of bit fields
2024-08-11 10:28:09 -07:00
Victor Zverovich
50a8c3e9bf
Reduce format specs size
2024-08-10 09:34:35 -07:00
Victor Zverovich
7891699737
Simplify handling of dynamic specs
2024-08-04 08:47:07 -07:00
Victor Zverovich
1db2274966
Use us if Unicode is disabled
2024-08-01 10:24:43 -07:00
Victor Zverovich
a80d668a52
Diagnose invalid precision
2024-07-27 10:41:54 -07:00
Victor Zverovich
ffdc3fdbd9
Align digits table
2024-07-24 18:43:37 -07:00
Victor Zverovich
4239dfe081
Simplify format_decimal
2024-07-22 17:00:16 -07:00
Victor Zverovich
f6b4a23b83
Unbloat chrono
2024-07-22 15:46:58 -07:00
LoveSy
8687315e86
Guard more system headers by FMT_MODULE ( #4006 )
...
* Guard more system headers by `FMT_MODULE`
* Merge FMT_MODULE and FMT_IMPORT_STD
2024-06-14 10:53:51 -07:00
LoveSy
0f6e716548
Fix missing includes in fmt.cc ( #3994 )
...
This causes duplicated std definitions in the fmt module
2024-06-08 13:50:29 -07:00
Victor Zverovich
7bd11b5cdf
Remove a redundant extension to reduce divergence from std::format
2024-06-08 08:29:34 -07:00
LoveSy
94f96d112d
Fix undefined reference when compiling with FMT_STATIC_THOUSANDS_SEPARATOR and chrono.h
2024-06-05 21:01:42 -07:00
Victor Zverovich
ab29ef37d9
Migrate docs and cleanup
2024-06-02 13:17:04 -07:00
ZaheenJ
ca8eeb09ee
Add glibc ext for day of month and week of year ( #3976 )
2024-05-30 10:20:56 -07:00
Victor Zverovich
7d6ae972b9
Cleanup unicode checks
2024-05-11 19:43:46 -07:00
Victor Zverovich
7650ed04a3
Fix to_nonnegative_int
2024-05-03 07:49:16 -07:00
Matthias Moulin
116a9ce488
Added FMT_IMPORT_STD feature macro ( #3928 )
2024-04-10 11:48:32 -07:00