Chronos

Release name: B1.196
Release summary: Improved support for parsing IS0 8601, and for printing Timeperiods. Some bug fixes.
Automatic version: 8
Manual version: B1.196
Published by: Alan Lovejoy (chronos)
Categories:
Release note:

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 correponds 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 classnowIn: aChronosTimezoneOrTimezoneReference as: aCalendarOrCalendarReference duration: aDurational
Timeperiod classnowIn: aChronosTimezoneOrTimezoneReference duration: aDurational
Timeperiod classnowWithDuration: aDurational

3. Changed the semantics of both Timeperiod classtodayIn:as: and Timeperiod classtodayIn:, 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 B1.190 using StORE that only is an issue when a previous version of Chronos is already in the image. Not relevant otherwise (loading into clean image works fine using B1.190.)

5. Fixed bug in ChronosPrintPolicy classnewANSIStandard, 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.


Release homepage:
Download: http://chronos-st.org/downloads/Squeak/Chronos.sar
SHA checksum: 1235485267792849545459773247357808619489989902199

Back