fmtlib / fmt

A modern formatting library
https://fmt.dev
Other
19.84k stars 2.42k forks source link

Add support for %k and %l chrono specifiers #3982

Closed ZaheenJ closed 1 month ago

ZaheenJ commented 1 month ago

Trivially support "%k" and "%l", which strftime supports as equivalents to "%_H" and "%_I" respectively. Previous discussion here #3976

vitaut commented 1 month ago

Thanks for the PR. I'm not sure if we need this considering that we already have %_H and %_I. Is there any benefit other than these being a bit shorter?

ZaheenJ commented 1 month ago

Only real benefit is it matches the manpages for date and strftime. (Personally I was using the date manpage to configure my Waybar.)

vitaut commented 1 month ago

I think it's more important to minimize the divergence from the standard formatter than to try mimic GNU strftime. But thanks for the PR anyway.