[GOODIE] TimeStamp -- why isn't this already in Squeak?

Norton, Chris chrisn at Kronos.com
Fri Oct 13 15:57:42 UTC 2000


Hi Lex.

I don't know what the ANSI spec says in this case, but I can tell you that
TimeStamp is a base class in Visual Smalltalk Enterprise and that it is a
generally useful concept.  I've been using them for years "on the job".

Cheers,

---==> Chris

PS>  I really do like the term "TimeStamp" over "DateAndTime".  It just has
a better sound to me.  :-)

> -----Original Message-----
> From:	Lex Spoon [SMTP:lex at cc.gatech.edu]
> Sent:	Friday, October 13, 2000 7:31 AM
> To:	squeak at cs.uiuc.edu
> Subject:	Re: [GOODIE] TimeStamp -- why isn't this already in Squeak?
> 
> Is your TimeStamp what ANSI would call a DateAndTime?  That is, a
> specific time on a specific day?  If so, then someone has already
> implemented all the ANSI stuff, including DateAndTime.  Also, someone
> has long ago implemented basic timezone support for DateAndTime's.
> 
> The fear is that the ANSI stuff is so much code, that when it gets
> loaded into Squeak, tons of stuff is going to break.  And besides that,
> SC is chasing much more exciting problems right now...
> 
> Sorry I don't have the exact URL handy.  (Someone should add it to the
> Swiki AllProjects page so that people can find it)
> 
> -Lex
> 
> 
> 
> 
> 
> "Norton, Chris" <chrisn at Kronos.com> wrote:
> > This message is in MIME format. Since your mail reader does not
> understand
> > this format, some or all of this message may not be legible.
> > 
> > ------_=_NextPart_000_01C033F9.D3275FFF
> > Content-Type: text/plain
> > 
> > Hi Folks!
> > 
> > I was coding furiously the other evening and I needed a TimeStamp, so I
> > tried to add one to my code and discovered that TimeStamp doesn't exist
> in
> > Squeak!  Well, needless to say, I found this to be intolerable so I
> > implemented it... <grin>
> > 
> > This changeset has been tested on Windows NT 4.0 on Squeak 2.7 (cs 1782)
> and
> > on Squeak 2.9a (cs 2774).
> > 
> > Caveat:  
> > 
> > Somebody changed the acceptable string format on Date class>>fromString:
> > between 2.7 and 2.9a.  Consequentially, one of the examples in the
> TimeStamp
> > class comment will not work in Squeak 2.7 "as is".  If you want to try
> out
> > the TimeStamp class>>fromString: in Squeak 2.7, try this instead:
> > 
> > TimeStamp fromString: '01/10/2000 11:55:00 am'
> > 
> > All examples of TimeStamp class>>fromString: work with Squeak 2.9a.
> > 
> > Engineering Notes:
> > 
> > *	I added an obvious conversion method to Date
> > *	I added Time class>>fromString: for polymorphism (symmetry between
> > Date, Time and TimeStamp)
> > *	I did not tackle TimeZones.  I'll leave that to another ambitious
> > Squeaker!  :-)
> > 
> > ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
> > Change Set:		TimeStamp
> > Date:			7 October 2000
> > Author:			Chris Norton
> > 
> > This changeset introduces TimeStamps to Squeak.
> > 
> > There are also some Time and Date methods that were added for
> completeness.
> > 
> > You'll notice that the #= method mentions Time Zones.  TimeStamp doesn't
> > currently know about Time Zones, but it probably should in the future.
> For
> > now, I'll leave Time Zones as an exercise for the reader.  :-)
> > 
> > I hope you enjoy TimeStamp!
> > 
> > ---==> Chris
> > 
> >  <<TimeStamp.1.cs.gz>> 
> > 
> > ------_=_NextPart_000_01C033F9.D3275FFF
> > Content-Type: application/octet-stream;
> > 	name="TimeStamp.1.cs.gz"
> > Content-Transfer-Encoding: base64
> > Content-Disposition: attachment;
> > 	filename="TimeStamp.1.cs.gz"
> > 
> >
> H4sIAAAAAAAAALVZbW/jNhL+7A/6D5O0gGNc7Pol2XR96wBpc0FfkLRogsP1FmlBS7QtrEy6Ih
> Vv
> >
> Dvvjb2YoWZTsxGnsLHaxkjgkn3nmhZxx8yrVc7j9K5PiU7/zXiSLmQA9gd4AfsqUhH6324WPib
> DS
> >
> WMgWET4M4av+2dnJPWgFZ/BLaPVYpk5QWOgNu4Ph4AzEvHkQHH4/E2oq4VbaYaNxF8/lrRXzRX
> BJ
> >
> yzQajer04CKzM53SwPezNDZwo1OrVRDczfAl5KWMtBArm+ooC6WB1ZIGrM7V6NAEmUoQ9C8xGo
> ye
> >
> SxYFoSKgzWEucasIZ80Q85Klo0hGMNEphHq+SKSVShqDi/2us2aSgNI2DqWbYGcSvhrli+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UxtadficVB66y8zonUO0hbG
> 4l
> >
> jYXB3y20y8uucbchhkkhNtUSvA3Iet4e9Ipt7HRTRtq1JXZWNCSfreq2abZ2IHlRXwQ5WpXJ27
> xb
> >
> zbpRSfOGnuxRWVK2a+dbq7Vnht6qZfvijnsHXA/3C2LkRIB85k/YjdrcyOVT4LtEqE/mLo3xR5
> po
> >
> xS/6Ut5AKK2RAzjKl80Wd3oIX0OrBStHPFprM1elFabUfVPf+/YlPWQuoFK5wF90MNuY/EeOzZ
> 3l
> >
> 4hOl3/IXkX3Dfu/B5kRfvU1uwe9SzGb860mIzVJI7luRd9v65U9yX+ui0+vbcl5A3YHvGuYnuC
> ap
> >
> tTM0lTqdChX/Tx4ER34vmpOTW4lPP16oRTJez83rAlf7pGU30W+80XSv4vpAvY4RVn5YtlEN5I
> bL
> > q6krZrwKwN2Nwbsi+yctTS/vhcVlpUU/3P0fou+Xj5UgAAA=
> > 
> > ------_=_NextPart_000_01C033F9.D3275FFF--
> 





More information about the Squeak-dev mailing list