lib/icu_utils/date.rb in icu_utils-1.2.0 vs lib/icu_utils/date.rb in icu_utils-1.2.1
- old
+ new
@@ -57,9 +57,10 @@
# on_or_before: must be on or before %{restriction}
private
def to_date(thing)
+ thing = thing.call if thing.respond_to?(:call)
if thing.is_a?(Date)
thing.dup
else
thing = ::Date.parse(thing.to_s)
end