In the latest version, @ShawnZhong implemented #2959 via #3271. This allows the use of -
as a modifier in chrono format specs to omit the leading zero from H
, M
, and S
.
However, a difference from std::strftime
is that the modification "sticks" to an entire format spec, so {:-M:%S}
behaves differently than {:%-M}:{:%S}
(the former strips the leading zero from minutes and seconds, while the latter only modifies the minutes). Is this intended behavior?
Here is a godbolt repro.
As a side note, unless I missed it the -
extension for chrono specs is not mentioned in the documentation.
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4