Skip to content

Commit

Permalink
Fix %e regexp
Browse files Browse the repository at this point in the history
%e matched " 31" (space 3 1) before. Now it correctly matches only space digit or digit digit to resemble strftime's output for %e.
  • Loading branch information
Clemens Kofler committed Mar 22, 2011
1 parent 003462b commit ef1885e
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion lib/delocalize/localized_date_time_parser.rb
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ class LocalizedDateTimeParser
'%a' => "(#{Date::ABBR_DAYNAMES.join('|')})", # short day name
'%Y' => "(\\d{4})", # long year
'%y' => "(\\d{2})", # short year
'%e' => "(\\s?\\d{1,2})", # short day
'%e' => "(\\s\\d|\\d{2})", # short day
'%d' => "(\\d{2})", # full day
'%H' => "(\\d{2})", # hour (24)
'%M' => "(\\d{2})", # minute
Expand Down

0 comments on commit ef1885e

Please sign in to comment.