[Glass] Comment of #newDay:monthNumber:year: is wrong (and I do not like the behavior either!)
Mariano Martinez Peck via Glass
glass at lists.gemtalksystems.com
Fri Aug 7 06:35:29 PDT 2015
Hi guys,
Just for the record, the comment of:
Date class >> newDay: day monthNumber: month year: year
*"*Creates and returns an instance of the receiver from the specified
values.
* Generates an error if any of the values are out of range."*
Is wrong since it does not throws and error and instead shifts the day.
Example:
Date newDay: 31 monthNumber: 6 year: 2015 -> 07/01/2015 (June has only
30 days)
BTW... This is a frustrating behavior for me. Pharo would correctly throw a
DateError, but GemStone shifts and gives me back another date. This could
lead to problems quite hard to debug.
Cheers,
--
Mariano
http://marianopeck.wordpress.com
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150807/b0de56e8/attachment.html>
More information about the Glass
mailing list