=pod =encoding utf8 =head1 NAME Muldis::D::Ext::Temporal - Muldis D extension for temporal data types and operators =head1 VERSION This document is Muldis::D::Ext::Temporal version 0.7.1. =head1 PREFACE This document is part of the Muldis D language specification, whose root document is L; 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 or the I; 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, are non-mandatory and are defined in terms of the core or each other, but the reverse isn't true. This current C document describes the system-defined I, 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. I =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 3 just reappear from the core set to provide a similar context, and aren't re-described here): sys.std.Core.Type.Universal sys.std.Core.Type.Empty sys.std.Core.Type.Scalar # The following are all regular ordered scalar types. sys.std.Temporal.Type.DateTimeWithTZ sys.std.Temporal.Type.DateWithTZ sys.std.Temporal.Type.TimeWithTZ sys.std.Temporal.Type.DurationWithTZ sys.std.Temporal.Type.DurationOfDaysWithTZ sys.std.Temporal.Type.DateTimeNoTZ sys.std.Temporal.Type.DateNoTZ sys.std.Temporal.Type.TimeNoTZ sys.std.Temporal.Type.DurationNoTZ sys.std.Temporal.Type.DurationOfDaysNoTZ I =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 =over =item C A C is a single specific time on a specific date, with precision to arbitrary fractions of a second. It I incorporate an explicit terrestrial time-zone offset (relative to UTC), so you use it when you I the time-zone and it is significant (which is usually). It is conceptually calendar-agnostic. The default value of C 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 subtype, you must specify the earliest and latest datetimes it includes, and also its least magnitude fraction of a second. =item C A C is the same as C 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 subtype, you must specify the earliest and latest dates it includes. =item C A C 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. 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 subtype, you must specify its least magnitude fraction of a second. =item C A C 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 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 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 A C is the same as C 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 subtype, you must specify the minimum and maximum amount of time that its values may be. =item C A C is the same as C in its precision, but it I 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 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. =item C A C is the same as C in all respects but that its differences correspond to the differences between C and C. Matters of its cardinality are the same as for C. =item C A C is the same as C in all respects but that its differences correspond to the differences between C and C. Matters of its cardinality are the same as for C. =item C A C is the same as C 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 values. Matters of its cardinality are the same as for C. =item C A C is to C what C is to C. =back =head1 SEE ALSO Go to L for the majority of distribution-internal references, and L for the majority of distribution-external references. =head1 AUTHOR Darren Duncan (C) =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 for details. =head1 TRADEMARK POLICY The TRADEMARK POLICY in L applies to this file too. =head1 ACKNOWLEDGEMENTS The ACKNOWLEDGEMENTS in L apply to this file too. =cut