[squeak-dev] Re: How to have a fast and usable Date? (was: new Bug in Locale)

Jon Hylands jon at huv.com
Thu Feb 2 20:45:14 UTC 2012


On Thu, Feb 2, 2012 at 2:50 PM, Yanni Chiu <yanni at rogers.com> wrote:

> On 02/02/12 11:25 AM, Chris Muller wrote:
>
>>
>> Best to strip all Dates (NOT DateAndTimes) of their timezone.
>>
>
> IMHO, there are two different concepts getting mixed up.
>
> 1) There is a "date", which has a day, month and year (and calendar). If
> you're modeling dates to be printed on a 12-month calendar that can be used
> anywhere in the world, then this is the kind of date you want.
>
> 2) There is the 24hr period (sometimes 23hr or 25hr) which corresponds to
> that "date". This 24hr period is timezone dependent. If you're making a
> scheduling application, then this is the kind of date you need.
>

I assume that's what a Timespan is for, the superclass of Date.

Actually, it looks to me like we're missing a class. Perhaps we should have
a "Day", which represents that 24 hour period, since we have similar
classes for Week, Month, and Year, which are also all Timespans. That would
allow Date to represent #1 above.

Thoughts?

- Jon
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://lists.squeakfoundation.org/pipermail/squeak-dev/attachments/20120202/bd33931b/attachment.htm


More information about the Squeak-dev mailing list