[Glass] Comment of #newDay:monthNumber:year: is wrong (and I do not like the behavior either!)
Dale Henrichs via Glass
glass at lists.gemtalksystems.com
Fri Aug 7 13:10:29 PDT 2015
Mariano,
Thanks for the report, I've submitted an internal bug (45525) on this
against 3.2.7 and 3.3.
Dale
On 08/07/2015 06:35 AM, Mariano Martinez Peck via Glass wrote:
> 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
>
>
> _______________________________________________
> Glass mailing list
> Glass at lists.gemtalksystems.com
> http://lists.gemtalksystems.com/mailman/listinfo/glass
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.gemtalksystems.com/mailman/private/glass/attachments/20150807/9340427a/attachment.html>
More information about the Glass
mailing list