|
Language::MuldisD::Ext::Temporal - Muldis D extension for temporal data types and operators |
Language::MuldisD::Ext::Temporal - Muldis D extension for temporal data types and operators
This document is Language::MuldisD::Ext::Temporal version 0.5.1.
This document is part of the Muldis D language specification, whose root document is the Language::MuldisD manpage; you should read that root document before you read this one, which provides subservient details.
Muldis D has a mandatory core set of system-defined (eternally available) entities, which is referred to as the Muldis D core or the core; they are the minimal entities that all Muldis D implementations need to provide; they are mutually self-describing and are used to bootstrap the language; any entities outside the core, called Muldis D extensions, are non-mandatory and are defined in terms of the core or each other, but the reverse isn't true.
This current Temporal document describes the system-defined Muldis D
Temporal Extension, which consists of temporal data types and operators,
particularly durations and dates or times.
This current document does not describe the polymorphic operators that all types, or some types including core types, have defined over them; said operators are defined once for all types in the Language::MuldisD::Core manpage.
This documentation is pending.
Following are all the data types described in this document, arranged in a type graph according to their proper sub|supertype relationships (but that the first 4 just reappear from the core set to provide a similar context, and aren't re-described here):
sys.Core.Universal.Universal
sys.Core.Universal.Empty
sys.Core.Scalar.Scalar
sys.Core.Ordered.Ordered
# The following are all regular ordered scalar types.
sys.Temporal.WithTZ.DateTime
sys.Temporal.WithTZ.Date
sys.Temporal.WithTZ.Time
sys.Temporal.WithTZ.Duration
sys.Temporal.WithTZ.DurationOfDays
sys.Temporal.NoTZ.DateTime
sys.Temporal.NoTZ.Date
sys.Temporal.NoTZ.Time
sys.Temporal.NoTZ.Duration
sys.Temporal.NoTZ.DurationOfDays
This documentation is pending.
These non-core scalar data types describe common kinds of temporal artifacts according to modern calendars. They come in a variety of precisions and epochs so that users can pick one that most accurately represents what they actually know about their data. Of course, dealing with these types in general isn't a perfect science; they stand to be revised or rewritten.
sys.Temporal.WithTZ.DateTimeWithTZ.DateTime is a single specific time on a specific date, with
precision to arbitrary fractions of a second. It does incorporate an
explicit terrestrial time-zone offset (relative to UTC), so you use it when
you do know the time-zone and it is significant (which is usually). It
is conceptually calendar-agnostic. The default value of
WithTZ.DateTime is the Perl 6 epoch, namely 2000-1-1T0:0:0 in the
Gregorian calendar, with a time-zone offset of zero. This type's minimum
and maximum values are some kind of infinities. The cardinality of this
type is infinity; to define a most-generalized finite WithTZ.DateTime
subtype, you must specify the earliest and latest datetimes it includes,
and also its least magnitude fraction of a second.
sys.Temporal.WithTZ.DateWithTZ.Date is the same as WithTZ.DateTime in all respects but
that its precision is only to the whole terrestrial day. Its default value
is 2000-1-1 in the Gregorian calendar. The cardinality of this type is
infinity; to define a most-generalized finite WithTZ.Date subtype, you
must specify the earliest and latest dates it includes.
sys.Temporal.WithTZ.TimeWithTZ.Time is a single specific time that isn't on any day in
particular, and isn't part of any calendar in particular, with a precision
to arbitrary fractions of a second; its allowed range is between zero
seconds (inclusive) and 1 terrestrial day (exclusive). It does incorporate
an explicit time-zone offset interval as per WithTZ.DateTime. Its
default and minimum value is 0:0:0; its maximum value is 1 terrestrial day
in actuality, due to rounding from something slightly less than that. The
cardinality of this type is infinity; to define a most-generalized finite
WithTZ.Time subtype, you must specify its least magnitude fraction of
a second.
sys.Temporal.WithTZ.DurationWithTZ.Duration is a single amount of time, with precision to
arbitrary fractions of a second. It is not fixed to any date or time and
is agnostic to the calendar. It is the result type of taking the
difference between two WithTZ.DateTime values, and is likewise assumed
to be as unambiguous as when you know the time-zone offsets are known. Its
default value is zero; its minimum and maximum values are some kind of
infinities. The cardinality of this type is infinity; to define a
most-generalized finite WithTZ.Duration subtype, you must specify the
minimum and maximum amount of time that its values may be, plus the
granularity of the type in fractions of a second.
sys.Temporal.WithTZ.DurationOfDaysWithTZ.DurationOfDays is the same as WithTZ.Duration in all
respects but that its precision is only to the whole terrestrial day. The
cardinality of this type is infinity; to define a most-generalized finite
WithTZ.DurationOfDays subtype, you must specify the minimum and
maximum amount of time that its values may be.
sys.Temporal.NoTZ.DateTimeNoTZ.DateTime is the same as WithTZ.DateTime in its
precision, but it does not incorporate an explicit terrestrial time-zone
offset interval, and so it is conceptually ambiguous within an interval of
about 25 hours; you use it when you do not know the time-zone or it is
not significant (which is not usually). Its default value is
2000-1-1T0:0:0 in the Gregorian calendar. Matters of its cardinality are
the same as for WithTZ.DateTime.
sys.Temporal.NoTZ.DateNoTZ.Date is the same as WithTZ.Date in all respects but
that its differences correspond to the differences between
WithTZ.DateTime and NoTZ.DateTime. Matters of its
cardinality are the same as for WithTZ.Date.
sys.Temporal.NoTZ.TimeNoTZ.Time is the same as WithTZ.Time in all respects but
that its differences correspond to the differences between
WithTZ.DateTime and NoTZ.DateTime. Matters of its
cardinality are the same as for WithTZ.Time.
sys.Temporal.NoTZ.DurationNoTZ.Duration is the same as WithTZ.Duration in all
respects but that it is considered ambiguous within a 50 hour interval, and
it is the result type of taking the difference between two
NoTZ.DateTime values. Matters of its cardinality are the same
as for WithTZ.Duration.
sys.Temporal.NoTZ.DurationOfDaysNoTZ.DurationOfDays is to WithTZ.DurationOfDays what
NoTZ.Duration is to WithTZ.Duration.
Go to the Language::MuldisD manpage for the majority of distribution-internal references, and the Language::MuldisD::SeeAlso manpage for the majority of distribution-external references.
Darren Duncan (perl@DarrenDuncan.net)
This file is part of the formal specification of the Muldis D language.
Muldis D is Copyright © 2002-2007, Darren Duncan.
See the LICENSE AND COPYRIGHT of the Language::MuldisD manpage for details.
The ACKNOWLEDGEMENTS in the Language::MuldisD manpage apply to this file too.
|
Language::MuldisD::Ext::Temporal - Muldis D extension for temporal data types and operators |