andrewplummer/Sugar — Issue #60: Time inconsistencies depending on the date expression
Author: jorgemanrubia
Created: 2011-11-18 11:54:29+00:00
State: open

Hi,

I have seen that sometimes, date parsing considers the time while other times it doesn't.

For example. In this case it considers 00:00:00 as the time.

Date.create('next sunday').toString()
"Sun Nov 20 2011 00:00:00 GMT+0100 (CET)" // It consider 0:00 as the time

But in these cases it considers that you want to keep the current time.

Date.create('next month').toString()
"Sun Dec 18 2011 12:48:21 GMT+0100 (CET)"

Date.create('1 week from now').toString()
"Fri Nov 25 2011 12:48:28 GMT+0100 (CET)"

I think this later examples are wrong. If your are asking for "next month", it doesn't make sense to set the time.

Congrats for the lib by the way. It's impressive.

Regards