def preprocess(str)
      str.gsub!(/late/i, '')
      str.gsub!(/early/i, '')
      str.strip!
      str.gsub!(/\s+/, ' ')
      str.gsub!('0s', 'x') if str.match(/^[1-9]+0s$/)
      str.gsub!('-', 'x') if str.match(/^[1-9]+\-+$/)
      str
    end
def preprocess(str)
      str.gsub!(/late/i, '')
      str.gsub!(/early/i, '')
      str.strip!
      str.gsub!(/\s+/, ' ')
      str.gsub!('0s', 'x') if str.match(/^[1-9]+0s$/)
      str.gsub!('-', 'x') if str.match(/^[1-9]+\-+$/)
      str
    end
Preprocess the date string to remove extra whitespace and convert ad hoc
 formatting to equivalent EDTF.

 @todo should '-` be intepreted as 'x' or '?'
 @see http://www.loc.gov/standards/datetime/pre-submission.html#maskedprecision