Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add support for '%-l' option to Flatpickr. #3616

Conversation

gguerini
Copy link
Contributor

@gguerini gguerini commented Apr 6, 2023

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

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.
@coveralls
Copy link

Coverage Status

Coverage: 95.814%. Remained the same when pulling 14e4357 on gguerini:gg-add-support-for-not-padded-hour-of-day-flatpickr into 5a958e4 on railsadminteam:master.

@mshibuya mshibuya merged commit 923d73e into railsadminteam:master Jun 17, 2023
@mshibuya
Copy link
Member

Thank you!

jklimke added a commit to 3dcl/rails_admin that referenced this pull request Jun 27, 2023
* 'master' of github.com:railsadminteam/rails_admin: (53 commits)
  fix is_blank and is_present filters for uuid columns (railsadminteam#3629)
  Add support for '%-l' option to Flatpickr. (railsadminteam#3616)
  Fix polymorphic association target classes not set correctly in subclasses
  Fix multiple_carrierwave field spec failing due to mocking
  Fix webpacker build
  Relax Rubocop Metrics/ClassLength threshold
  Version 3.1.2
  Postpone introduction of the new event name `rails_admin:dom_ready`
  Fix install failing with importmap setup
  Fix to show non-eager-loaded models which are explicitly configured
  Change dom_ready event name to use colon as the separator
  Restore caching in RailsAdmin::Config::Model#excluded? (railsadminteam#3587)
  Update GitHub Actions Badge URL
  Optimize file path to class name conversion (railsadminteam#3589)
  Switch to the safe navigation operator in spec files (railsadminteam#3588)
  Fix typo: Envinronment ==> Environment (railsadminteam#3586)
  Enable RuboCop Style/Encoding and apply auto-fixes (railsadminteam#3585)
  Add CI testing for Ruby 3.2 (railsadminteam#3583)
  Version 3.1.1
  Fix some typos (railsadminteam#3580)
  ...
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants