$ ruby -rdate -e 'd=Date.today; puts "#{d} #{d-1}"'
2004-07-01 2004-06-30