NAME
Language::MuldisD::Ext::Temporal - Muldis D extension for temporal data types and operators
VERSION
This document is Language::MuldisD::Ext::Temporal version 0.4.0.
PREFACE
This document is part of the Muldis D language specification, whose root document is Language::MuldisD; you should read that root document before you read this one, which provides subservient details.
DESCRIPTION
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 Language::MuldisD::Core.
This documentation is pending.
TYPE SUMMARY
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.type.Universal
sys.type.Empty
sys.type.Scalar
sys.type.Ordinal
# The following are all regular ordinal scalar types.
sys.type.Temporal.DateTime
sys.type.Temporal.Date
sys.type.Temporal.Time
sys.type.Temporal.Duration
sys.type.Temporal.DurationOfDays
sys.type.Temporal.DateTimeNoTZ
sys.type.Temporal.DateNoTZ
sys.type.Temporal.TimeNoTZ
sys.type.Temporal.DurationNoTZ
sys.type.Temporal.DurationOfDaysNoTZ
This documentation is pending.
SYSTEM-DEFINED TEMPORAL SCALAR DATA TYPES
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.type.Temporal.DateTime
-
A
Temporal.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 ofTemporal.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 finiteTemporal.DateTime
subtype, you must specify the earliest and latest datetimes it includes, and also its least magnitude fraction of a second. sys.type.Temporal.Date
-
A
Temporal.Date
is the same asTemporal.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 finiteTemporal.Date
subtype, you must specify the earliest and latest dates it includes. sys.type.Temporal.Time
-
A
Temporal.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 perTemporal.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 finiteTemporal.Time
subtype, you must specify its least magnitude fraction of a second. sys.type.Temporal.Duration
-
A
Temporal.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 twoTemporal.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 finiteTemporal.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.type.Temporal.DurationOfDays
-
A
Temporal.DurationOfDays
is the same asTemporal.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 finiteTemporal.DurationOfDays
subtype, you must specify the minimum and maximum amount of time that its values may be. sys.type.Temporal.DateTimeNoTZ
-
A
Temporal.DateTimeNoTZ
is the same asTemporal.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 forTemporal.DateTime
. sys.type.Temporal.DateNoTZ
-
A
Temporal.DateNoTZ
is the same asTemporal.Date
in all respects but that its differences correspond to the differences betweenTemporal.DateTime
andTemporal.DateTimeNoTZ
. Matters of its cardinality are the same as forTemporal.Date
. sys.type.Temporal.TimeNoTZ
-
A
Temporal.TimeNoTZ
is the same asTemporal.Time
in all respects but that its differences correspond to the differences betweenTemporal.DateTime
andTemporal.DateTimeNoTZ
. Matters of its cardinality are the same as forTemporal.Time
. sys.type.Temporal.DurationNoTZ
-
A
Temporal.DurationNoTZ
is the same asTemporal.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 twoTemporal.DateTimeNoTZ
values. Matters of its cardinality are the same as forTemporal.Duration
. sys.type.Temporal.DurationOfDaysNoTZ
-
A
Temporal.DurationOfDaysNoTZ
is toTemporal.DurationOfDays
whatTemporal.DurationNoTZ
is toTemporal.Duration
.
SEE ALSO
Go to Language::MuldisD for the majority of distribution-internal references, and Language::MuldisD::SeeAlso for the majority of distribution-external references.
AUTHOR
Darren Duncan (perl@DarrenDuncan.net
)
LICENSE AND COPYRIGHT
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 Language::MuldisD for details.
ACKNOWLEDGEMENTS
The ACKNOWLEDGEMENTS in Language::MuldisD apply to this file too.