Cleaner datetime localization for xml output

rails5
echarp 5 years ago
parent c76c46a104
commit 32298c4980
  1. 4
      app/views/events/index.xml.builder
  2. 1
      config/locales/fr.yml

@ -4,8 +4,8 @@ xml.events do
@events.find_each do |event|
xml.event do
xml.title event.title
xml.tag! 'start-time', event.start_time.strftime('%Y/%m/%d %T')
xml.tag! 'end-time', event.end_time.strftime('%Y/%m/%d %T')
xml.tag! 'start-time', l(event.start_time, format: 'xml')
xml.tag! 'end-time', l(event.end_time, format: 'xml')
xml.place_name event.place_name
xml.address event.address
xml.city event.city

@ -9,3 +9,4 @@ fr:
formats:
at: '%A %e %B %Y à %Hh%M'
hours: '%Hh%M'
xml: '%Y/%m/%d %T'

Loading…
Cancel
Save