Victor Zverovich
dcea616535
Fix compilation with locale disabled in header-only mode
2025-09-26 07:48:43 -07:00
Victor Zverovich
a3b3d7ed46
Simplify duration cast
2025-09-13 11:32:03 -07:00
Victor Zverovich
556c4177b6
Remove deprecated localtime
2025-09-13 09:41:24 -07:00
Victor Zverovich
bfdef8b15d
Remove deprecated functions
2025-09-13 09:25:53 -07:00
Victor Zverovich
79c7f8a70b
Apply clang-tidy
2025-09-01 10:49:49 -07:00
Victor Zverovich
489fd7ca4b
Simplify locale handling
2025-08-31 09:33:43 -07:00
Victor Chernyakin
b5266fd3b9
Remove some redundant consts ( #4445 )
...
`constexpr` variables are implicitly `const`.
2025-05-12 10:41:58 -07:00
Victor Zverovich
8061c7c8c4
Cleanup duration formatter
2025-04-19 10:08:24 -07:00
Victor Zverovich
7b59df4119
Remove redundant member
2025-04-19 10:08:23 -07:00
Victor Zverovich
e814b5fabf
Reduce template parametrization
2025-04-13 10:17:17 -07:00
Victor Zverovich
ed0d216f7e
Fix localization and formatting of timezone names
2025-04-13 09:52:59 -07:00
Victor Zverovich
bd9554a29e
Fix formatting of timezone names
2025-04-13 08:52:26 -07:00
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