—=pod
=encoding utf8
=head1 NAME
Language::MuldisD::Ext::Temporal -
Muldis D extension for temporal data types and operators
=head1 VERSION
This document is Language::MuldisD::Ext::Temporal version 0.5.2.
=head1 PREFACE
This document is part of the Muldis D language specification, whose root
document is L<Language::MuldisD>; you should read that root document
before you read this one, which provides subservient details.
=head1 DESCRIPTION
Muldis D has a mandatory core set of system-defined (eternally available)
entities, which is referred to as the I<Muldis D core> or the I<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 I<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 C<Temporal> document describes the system-defined I<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 L<Language::MuldisD::Core>.
I<This documentation is pending.>
=head1 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.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
I<This documentation is pending.>
=head1 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. I<Of course, dealing
with these types in general isn't a perfect science; they stand to be
revised or rewritten.>
=over
=item C<sys.Temporal.WithTZ.DateTime>
A C<WithTZ.DateTime> is a single specific time on a specific date, with
precision to arbitrary fractions of a second. It I<does> incorporate an
explicit terrestrial time-zone offset (relative to UTC), so you use it when
you I<do know> the time-zone and it is significant (which is usually). It
is conceptually calendar-agnostic. The default value of
C<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 C<WithTZ.DateTime>
subtype, you must specify the earliest and latest datetimes it includes,
and also its least magnitude fraction of a second.
=item C<sys.Temporal.WithTZ.Date>
A C<WithTZ.Date> is the same as C<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 C<WithTZ.Date> subtype, you
must specify the earliest and latest dates it includes.
=item C<sys.Temporal.WithTZ.Time>
A C<WithTZ.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 C<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
C<WithTZ.Time> subtype, you must specify its least magnitude fraction of
a second.
=item C<sys.Temporal.WithTZ.Duration>
A C<WithTZ.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 C<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 C<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.
=item C<sys.Temporal.WithTZ.DurationOfDays>
A C<WithTZ.DurationOfDays> is the same as C<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
C<WithTZ.DurationOfDays> subtype, you must specify the minimum and
maximum amount of time that its values may be.
=item C<sys.Temporal.NoTZ.DateTime>
A C<NoTZ.DateTime> is the same as C<WithTZ.DateTime> in its
precision, but it I<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 I<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 C<WithTZ.DateTime>.
=item C<sys.Temporal.NoTZ.Date>
A C<NoTZ.Date> is the same as C<WithTZ.Date> in all respects but
that its differences correspond to the differences between
C<WithTZ.DateTime> and C<NoTZ.DateTime>. Matters of its
cardinality are the same as for C<WithTZ.Date>.
=item C<sys.Temporal.NoTZ.Time>
A C<NoTZ.Time> is the same as C<WithTZ.Time> in all respects but
that its differences correspond to the differences between
C<WithTZ.DateTime> and C<NoTZ.DateTime>. Matters of its
cardinality are the same as for C<WithTZ.Time>.
=item C<sys.Temporal.NoTZ.Duration>
A C<NoTZ.Duration> is the same as C<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
C<NoTZ.DateTime> values. Matters of its cardinality are the same
as for C<WithTZ.Duration>.
=item C<sys.Temporal.NoTZ.DurationOfDays>
A C<NoTZ.DurationOfDays> is to C<WithTZ.DurationOfDays> what
C<NoTZ.Duration> is to C<WithTZ.Duration>.
=back
=head1 SEE ALSO
Go to L<Language::MuldisD> for the majority of distribution-internal
references, and L<Language::MuldisD::SeeAlso> for the majority of
distribution-external references.
=head1 AUTHOR
Darren Duncan (C<perl@DarrenDuncan.net>)
=head1 LICENSE AND COPYRIGHT
This file is part of the formal specification of the Muldis D language.
Muldis D is Copyright © 2002-2008, Darren Duncan.
See the LICENSE AND COPYRIGHT of L<Language::MuldisD> for details.
=head1 ACKNOWLEDGEMENTS
The ACKNOWLEDGEMENTS in L<Language::MuldisD> apply to this file too.
=cut