NAME

Muldis::D::Core::Temporal - Muldis D operators for TAI temporal data types

VERSION

This document is Muldis::D::Core::Temporal version 0.101.0.

PREFACE

This document is part of the Muldis D language specification, whose root document is Muldis::D; you should read that root document before you read this one, which provides subservient details. Moreover, you should read the Muldis::D::Core document before this current document, as that forms its own tree beneath a root document branch.

DESCRIPTION

This document describes essentially all of the core Muldis D operators that are specific to the core data types Instant and Duration, which represent TAI temporal artifacts.

This documentation is pending.

FUNCTIONS FOR TEMPORAL MATH

These functions implement commonly used temporal math operations.

Instant

sys.std.Core.Temporal.Instant.diff

function sys.std.Core.Temporal.Instant.diff (Duration <-- $minuend : Instant, $subtrahend : Instant)

This function results in the duration-typed difference when its instant-typed subtrahend argument is subtracted from its instant-typed minuend argument. The result is the amount of time between the 2 arguments, which may be positive or negative depending on which argument was earlier.

sys.std.Core.Temporal.Instant.abs_diff

function sys.std.Core.Temporal.Instant.abs_diff (Duration <-- $topic : Instant, $other : Instant)

This symmetric function results in the absolute difference between its 2 arguments. The result is the amount of time between the 2 arguments, which is always non-negative.

sys.std.Core.Temporal.Instant.later

function sys.std.Core.Temporal.Instant.later (Instant <-- $instant : Instant, $duration : Duration)

This function results in the instant that is later than its instant argument by the amount of time in the duration argument.

sys.std.Core.Temporal.Instant.earlier

function sys.std.Core.Temporal.Instant.earlier (Instant <-- $instant : Instant, $duration : Duration)

This function results in the instant that is earlier than its instant argument by the amount of time in the duration argument.

Duration

sys.std.Core.Temporal.Duration.abs

function sys.std.Core.Temporal.Duration.abs (Duration <-- $topic : Duration)

This function results in the absolute value of its argument.

sys.std.Core.Temporal.Duration.sum

function sys.std.Core.Temporal.Duration.sum (Duration <-- $topic? : bag_of.Duration)

This function results in the sum of the N element values of its argument; it is a reduction operator that recursively takes each pair of input values and adds (which is both commutative and associative) them together until just one is left, which is the result. If topic has zero values, then sum results in the duration zero, which is the identity value for addition.

sys.std.Core.Temporal.Duration.diff

function sys.std.Core.Temporal.Duration.diff (Duration <-- $minuend : Duration, $subtrahend : Duration)

This function results in the difference when its subtrahend argument is subtracted from its minuend argument.

SYSTEM-SERVICES FOR CURRENT DATES AND TIMES

These system-service routines provide ways to get the current date or time from the system.

sys.std.Core.Temporal.Instant.fetch_curr_instant

system-service sys.std.Core.Temporal.Instant.fetch_curr_instant (&$target : Instant)

This system-service routine will update the variable supplied as its target argument so that it holds the value of the current TAI instant as taken with the full precision that the implementation's system clock or used time server supports.

SEE ALSO

Go to Muldis::D for the majority of distribution-internal references, and Muldis::D::SeeAlso for the majority of distribution-external references.

AUTHOR

Darren Duncan (darren@DarrenDuncan.net)

LICENSE AND COPYRIGHT

This file is part of the formal specification of the Muldis D language.

Muldis D is Copyright © 2002-2009, Muldis Data Systems, Inc.

See the LICENSE AND COPYRIGHT of Muldis::D for details.

TRADEMARK POLICY

The TRADEMARK POLICY in Muldis::D applies to this file too.

ACKNOWLEDGEMENTS

The ACKNOWLEDGEMENTS in Muldis::D apply to this file too.