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

David T. Lewis lewis at mail.msen.com
Thu Feb 2 21:05:23 UTC 2012


On Thu, Feb 02, 2012 at 03:45:14PM -0500, Jon Hylands wrote:
> 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?

Sounds right to me. I can only add that whichever class most closely resembles
the ANSI Smalltalk definition of Date should be called "Date", and the other
thing can be called "Day".

Dave



More information about the Squeak-dev mailing list