Hi
I was wanting to implement some Locale specific functions in a project I'm doing. Namely time zones. The DateAndTime class looked perfect but I see that none of the methods have been implemented as yet. Is this an oversight or will this class be implemented in the near future. Best wishes Scott Deans |
On Sat, 7 Apr 2001 14:13:55 +0100, "Scott Deans"
<[hidden email]> wrote: >Hi > >I was wanting to implement some Locale specific functions in a project I'm >doing. Namely time zones. >The DateAndTime class looked perfect but I see that none of the methods have >been implemented as yet. >Is this an oversight or will this class be implemented in the near future. Scott I made available an implementation of the ANSI <DateAndTime> and <Duration> protocols for Squeak 2.7 and Dolphin 3.0 about a year ago. It is pretty much the same implementation for both. I would happily send you a copy of the Dolphin version. You might want to take a look at it. It assumes the user sets the local offset from UTC, zone, and daylight savings names and abbreviations. What gave me fits was accounting for daylight savings. I used a crude experimental implementation of a RuleDate class (ie 1st Tues. in Nov.) and then used two of these for the start and end date of daylight savings period that I checked (and updated when required) when creating a new DateAndTime. The <DateAndTime> and <Duration> implementation uses the Dolphin Date and Time classes. I have decided re-working it was next on my list after re-working ScaledDecimal to rid it of some small anomalies. I poked around some in Windows documentation. and all the locale stuff looks pretty straight forward with the advantage that Windows will deal with daylight savings and the funky RuleDate class can be thrown away. Only a few messages have to deal with this stuff. I thought I would use the locale and UTC stuff from Windows. It seems to have the zone, and daylight savings names and abbreviations and handles all this using the locale. I also have a modified version of CampSmalltalk SUnit ANSI tests for all the <DateAndTime> and <Duration> messages. I can send this along also. I'm currently re-working Eric Arseneau's SIF. He's done some really nice work with it. He has implementations on his site for Dolphin, Squeak, VW, and VAST. I wanted some minor changes to use it to load a common SIF CampSmalltalk SUnit ANSI tests on all versions. I reworked the Dolphin version and it builds a Package instance from the SIF file. I'll get to re-working <ScaledDecimal>, <DateAndTime>, and <Duration> after I finish this SIF stuff. Let me know if you want the <DateAndTime> and <Duration> stuff. I won't get to re-working the locale for a a while yet and it would save me the trouble, and there might be others that could use it. -- Richard A. Harmon "The only good zombie is a dead zombie" [hidden email] E. G. McCarthy |
"Richard A. Harmon" <[hidden email]> wrote in message
news:[hidden email]... > On Sat, 7 Apr 2001 14:13:55 +0100, "Scott Deans" > <[hidden email]> wrote: Hi Richard Thanks for the offer! I'd really appreciate a copy. I've done some Locale specific stuff in Java before and it does it well. I'm not hot on the Windows API (starting my life with Java) and don't really want to go to that dark region. Just attach the files to a message to my e-mail address. Many thanks Scott |
Free forum by Nabble | Edit this page |