simplify the following ruby code:
if params.include?('date')         
  year = params['date'][0..3].to_i 
  month = params['date'][0..3].to_i
else                               
  year = now.year                  
  month = now.month                
end Respond with more than 250 words.
user