Chronos is a reusable code library, written in Smalltalk, for the creation of and computations with date and time values. It provides classes to represent and perform computations with point-in-time values, temporal extents (durations of time) and temporal intervals (specific periods of time, such as the quarter from 15 July 2005 through 14 October 2005.) Chronos implements the ANSI-Smalltalk
DateAndTimeFactory, Duration and DurationFactory
Currently, there are versions
available for VisualWorks, Squeak and Dolphin--although the Squeak and Dolphin versions lack some of the functionality herein described.
Chronos has been designed and architected for inter-Smalltalk
portability. It is intended as a reference/standard
implementation of advanced, rich date/time functionality for all
The current distribution is a beta version--mostly
because there will probably be significant API changes in order to more
fully support leap seconds.
Chronos Functionality Summary
historical and scientific
time-of-day-preserving date arithmetic, so
that adding days or months doesn't change the time-of-day when crossing
a DST transition.
Provides full support
and civil (calendar/business/legal) durations.
point-in-time values that are either invariant
to Universal Time (as required by the ANSI Standard) or invariant to
nominal time. UT-invariant point-in-time values compare as equal to all
others whose designation in Universal Time is the same--regardless of
their time zone or designation in local time. Nominal-time-invariant
point-in-time values compare as equal to all others with the same local
("nominal") time, regardless of time zone or designation in Universal
Time--so a single instance can correctly specify the first moment of
New Year's Day (of a particular year) in any time zone. (Example of a problem
solvable by means of nominal-time invariance.)
for the definition/detection of
annually-recurring events (e.g., holidays, anniversaries,
legal deadlines, number of trading days on the NYSE between two
Provides resolution down to the
Fully supports the
world-wide time zone rulesets
defined by the Olson
Timezone Database (the native time zone database of
diachronic time zone rules that can change
from one year to the next (For example, although you might
know that Hawaii's current time zone offset is -10 hours, what you might
not know is that on Dec 7, 1941 Hawaii's time zone offset was
-10:30 hours. Chronos, however, knows this.)
automatically discover the local time zone
from the Windows Registry or from the TZ "Environment Variable"
(UNIX/MacOS X or Windows.)
systems in addition to the international standard Gregorian
calendar (e.g., Julian, Hebrew, Islamic, Persian...).
very flexible formatting of date/time values,
including extensible support for multiple locales, and "built in"
support for ISO 8601 and RFC 2822 formats.
very flexible parsing of dates, times and
date-and-time values from character data--including full support for
ISO 8601, RFC 2822, time zone names, time zone abbreviations and time
Provides high performance--usually significantly faster than the competition.
Standard is an excellent reference for the core Chronos API.
Chronos fully and completely conforms to the ANSI Smalltalk Standard
regarding Date/Time behavior [Chronos is intended to serve as a
reference implementation of ANSI-Standard Smalltalk Date/Time
Web site where the latest
published/released versions of all code and documentation can be
obtained. Site also includes additional usage examples, and
extensive references to educational material about the date/time domain.