Gem 自然语言时间解析

hpyhacking · March 23, 2013 · Last by hpyhacking replied at March 24, 2013 · 3277 hits

http://chronic.rubyforge.org/

可以解析自然语言的时间(英语)

你可以先试试这个 简单的自然语言表示法 似乎不需要那么复杂的 lib

require 'date'
DateTime.parse str

刚实验了一下,Rails 环境下可以解析大部分,Ruby 环境下还差下。

推荐 非 Rails 环境下使用此 Gem。 :)

You need to Sign in before reply, if you don't have an account, please Sign up first.