lib/weather-api/utils.rb in weather-api-1.0.1 vs lib/weather-api/utils.rb in weather-api-1.1.0

- old
+ new

@@ -4,18 +4,18 @@ class Utils # Attempts to convert passed text into a Time object # # Returns a Time object or nil - def self.parse_time(text = '') + def self.parse_time text = '' if text == '' return nil end begin - Time.parse(text) + Time.parse text rescue ArgumentError - Chronic.parse(text) + Chronic.parse text end end end end