bin/dates in sculd-0.1.3 vs bin/dates in sculd-0.2.0
- old
+ new
@@ -29,10 +29,9 @@
puts " e.g., dates 2012-01-26 2012-02-29 -i 2"
exit
end
def analyze_date(str)
- #pp TODAY
nums = str.split(/[\-\/]/).map{|i| i.to_i}
nums = [TODAY.day ] if nums.size == 0
nums = [TODAY.month, *nums] if nums.size == 1
nums = [TODAY.year, *nums] if nums.size == 2
Date.new(* nums)