Possible bug on Year class
Tom Phoenix
rootbeer at redcat.com
Sat Nov 18 17:35:51 UTC 2006
On 11/18/06, J J <azreal1977 at hotmail.com> wrote:
> I think there is a bug with the Year class (at least it is not consistant
> with the Month class): If you do "aDateAndTime asYear" it keeps the date in
> the start field so that if you then say "asDate" you get the original back
> instead of the expected January 1. If I do the same with "aDateAndTime
> asMonth asDate" it will switch from what ever date it was to the first day
> of that month (as I would expect).
So, you're saying
(Date fromString: 'April 23, 3048') asMonth asDate printString
answers "1 April 3048"; but
(Date fromString: 'April 23, 3048') asYear asDate printString
answers "23 April 3048" instead of the analogous "1 January 3048".
Seems to me like you should consider filing the bug report. Cheers!
--Tom Phoenix
More information about the Squeak-dev
mailing list
|