Questions tagged [chronic]

Chronic is a natural language date/time parser written in pure Ruby.

Chronic is a natural language date/time parser written in pure Ruby.

It can parse a wide range of date and time formats including simple ones such as "today", "tomorrow", more complex ones such as "5 months before now", "3rd thursday this september" as well as specific dates and times such as "may 27th" and "January 5 at 7pm".

See chronic.rubyforge.org for more details.

32 questions
0
votes
1 answer

Chronic - how to set a default year when parsing a month

I got an input field where the user inputs a date, currently I'm using Chronic and the user likes it. If the user enters last jan using Chronic and strftime I get January 2013 which is good, the issue comes when: the user input is an upcoming month…
M.Octavio
  • 1,780
  • 2
  • 25
  • 39
0
votes
1 answer

How can I use the Chronic natural language date/time parser to parse "12:00" as 12:00 PM?

I am using the ruby gem "Chronic" to parse four digit strings as DateTime objects. I am using time in military format (ie: "0800") which seems from the documentaion to be a valid format. In most cases, Chronic parses time in this format correctly…
rswolff
  • 3,258
  • 5
  • 28
  • 31
1 2
3