andrewplummer/Sugar — Issue #61: Months or days referring to past dates
Author: jorgemanrubia
Created: 2011-11-19 00:14:28+00:00
State: open

Hi,

It today it's tuesday, and you do

Date.create('monday')

It will return the date of yesterday, instead of the monday of the next week.

In the same way, if I do

Date.create('january')

I will expect to have january of 2012 (not 2011).

As with the issue #60 I reported before, this behaviour is not a bug at all. But if you think, a very typical use case of a natural language parser for dates is letting users to express due dates easily. If you are a human, you will probably be referring to events in the future by default. This is for example the way the famous Ruby Chronic library works: https://github.com/mojombo/chronic