Chronos is one of the many Smalltalk-related blogs syndicated on Planet Smalltalk

Discussion of the Essence# programming language, and related issues and technologies.

Blog Timezone: America/Los_Angeles [Winter: -0800 hhmm | Summer: -0700 hhmm] 
Your local time:  


Version B1.196 of the Chronos Date/Time Library Published

Chronos Version B1.196 has been published. Chronos B1.196 is available for VisualWorks, Squeak and Dolphin.

Chronos Version B1.196 can be obtained from the Chronos Web Site. The VisualWorks version can also be obtained from the Cincom Public StORE Repository, and the Squeak version can also be obtained from SqueakMap (as a .sar archive.) The Monticello-based version of B1.196 will be available on SqueakSource within a few days (the previous version, B1.190, is on SqueakSource now.)

NOTE: The SqueakMapPackageLoader tool does not work with the Chronos.sar archive, although Chronos.sar can be dowloaded to your local machine over HTTP and then installed using the Squeak FileList. (This problem has been reported, and a fix has been identified. See: [SM][BUG] Error: can't find EOCD position.)

You may also use the direct download link for VisualWorks, the direct download link for Squeak or the direct download link for Dolphin.

The Chronos Time Zone Repository is included in the download archive. Be sure to follow the Chronos Installation Instructions--especially if you have not already done so for a previous version of Chronos.

If you are reinstalling Chronos into an image in which an earlier version is already resident, and do not install the new version from the Cincom Public StORE Repository using StORE, it is necessary to first remove the earlier version. StORE has been able to correctly install the new version on top of every earlier version I have tried--but I haven't tried them all.

About Chronos Version B1.196

The following enhancements (or fixes) were made:

1. Enhanced both parsing and printing of Timeperiods, Timepoints and YearMonthDay values:

a) Full support was added for parsing ISO 8601 truncated date/time representations. Truncated date/time values are parsed into instances of Timeperiod. For example, "2007" is parsed into a Timeperiod with a duration of 1 year whose starting value is the YearMonthDay value for 2007-01-01.

b) The print behavior of Timeperiods was changed so that when the Timeperiod's starting value is at the start of a time unit (e.g, start of year, start of month, start of day, start of hour, start of minute, start of second,) and the extent of the Timeperiod's duration corresponds to that time unit, the Timeperiod is printed truncated to that unit, and no "/duration" is appended. This means that both the parsing and printing of date/time values conform to the behavior and semantics required by ISO 8601. For example, the printString for "Timeperiod from: YearMonthDay today duration: CalendarDayDuration" would be "2007-01-22" (if that is today's date.)

c) Since a YearMonthDay can't be bound to a time zone, support for date-valued points-in-time that are bound to a time zone was added by simply using a Timeperiod whose starting value is a Timepoint bound to the time zone, and whose duration is 1 day. So "YearMonthDay today >> (Timezone at: ''Pacific/Honolulu'')" now results in a Timeperiod with a duration of 1 day whose staring value is a Timepoint representing the initial moment of today, bound to the 'Pacific/Honolulu' time zone. The printString would be "2007-01-22-10:00" (if today's date were 2007-01-22.)

2. Added the following convenience methods to Timeperiod class (instance creation methods):

Timeperiod class>>nowIn:as:duration:
Timeperiod class>>nowIn:duration:
Timeperiod class>>nowWithDuration:

3. Changed the semantics of both Timeperiod class>>todayIn:as: and Timeperiod class>>todayIn:, so that the start value of the answered Timeperiod will now be a Timepoint bound to the specified time zone, and not a YearMonthDay (which cannot be bound to a time zone,) UNLESS the specified time zone is "ChronosTimezone nominal," in which case a YearMonthDay will be used as the starting value (as would have been the case all the time, previously.)

4. Fixed problem loading a new version of Chronos using StORE that only is an issue when a previous version of Chronos is already in the image. Not relevant otherwise (loading into a clean image worked as expected when installing versions prior to B1.196.)

5. Fixed bug in ChronosPrintPolicy class>>newANSIStandard, which in some cases would not answer an instance of ChronosPrintPolicy itself, but instead answer an instance of some subclass. Fixed it so that it always answers an instance of ChronosPrintPolicy itself, even when invoked as "self newANSIStandard" in a subclass.

No comments: