Parsing date from text using Ruby

前端 未结 3 1071
时光说笑
时光说笑 2021-01-03 16:28

I\'m trying to figure out how to extract dates from unstructured text using Ruby.

For example, I\'d like to parse the date out of this string \"Applications started

3条回答
  •  伪装坚强ぢ
    2021-01-03 16:58

    Try Chronic (http://chronic.rubyforge.org/) it might be able to parse that otherwise you're going to have to use Date.strptime.

提交回复
热议问题