Skip to content

Instantly share code, notes, and snippets.

View simonprev's full-sized avatar

Simon Prévost simonprev

View GitHub Profile
@simonprev
simonprev / gist:974566
Created May 16, 2011 14:49 — forked from ZenCocoon/gist:724366
Handling French date format in Ruby
## Try 1
# How could I get the following working nicely
Date.strptime("Ven 13 Mai. 2011, 16h00", "%a %d %b %Y, %Hh%M")
# I've tried to update Date::ABBR_DAYNAMES as follow
I18n.locale = :fr
Date::ABBR_DAYNAMES = I18n.t('date.abbr_day_names')
Date::ABBR_MONTHNAMES = I18n.t('date.abbr_month_names')