when "-D"
    (year,month,day) = val.split('-')
    if Date.valid_civil?(year.to_i,month.to_i,day.to_i)
      enddate= Date.new(year.to_i,month.to_i,day.to_i)
      puts "End Date: #{enddate}"