We currently support the options %-d, %-H, %-I, %-M, %-m, %-S, but not %-l. Adding %-l will prevent an error to be raised when the Ruby format uses this option.
Here's an example of how this could be used:
> datetime = DateTime.new(2023, 4, 6, 9, 15)
=> Thu, 06 Apr 2023 09:15:00 +0000
> datetime.strftime("at %-l:%M %p")
=> "at 9:15 AM" # no extra pad before the hour
> datetime.strftime("at %l:%M %p")
=> "at 9:15 AM" # extra pad before the hour
Coverage: 95.814%. Remained the same when pulling 14e4357f803e7512c1f5a0bff7301ba554e80527 on gguerini:gg-add-support-for-not-padded-hour-of-day-flatpickr into 5a958e46e8620fba320e04347d326d058c07d396 on railsadminteam:master.
We currently support the options
%-d
,%-H
,%-I
,%-M
,%-m
,%-S
, but not%-l
. Adding%-l
will prevent an error to be raised when the Ruby format uses this option.Here's an example of how this could be used: