lib/calendar_sniper.rb in calendar_sniper-1.0.2 vs lib/calendar_sniper.rb in calendar_sniper-1.0.3
- old
+ new
@@ -57,9 +57,11 @@
if /^\d{1,2}\/\d{1,2}\/\d{4}/ =~ str
'%m/%d/%Y'
elsif /^\d{4}-\d{1,2}-\d{1,2}/ =~ str
if /^\d{4}-\d{1,2}-\d{1,2} \S+/ =~ str
'%Y-%m-%d %Z'
+ elsif /^\d{4}-\d{1,2}-\d{1,2} \d{1,2}:\d{2}:\d{2}+/
+ '%Y-%m-%d %k:%M:%S'
else
'%Y-%m-%d'
end
else
raise "Date string in unknown format: #{str}"