Signatures of GuidedTrack operations🔗

This list is incomplete and not verified in detail.

Time + Time: Time, equal to the second summand
Time + Date: Datetime, being a combination of the time and the date
Time + Datetime: Datetime, being a combination of the time and the date part of
    the datetime
Time + Duration: Time
Time - Time: PureDuration<seconds>, being the distance between the two times
Time - Duration: Time
Date + Time: Datetime, being a combination of the date and the time
Date + Date: Date, equal to the second summand
Date + Datetime: Datetime, being a combination of the date and the time part of
    the datetime
Date + Duration: Date | Datetime. If the duration contains hours, minutes or
    seconds, it is added to 00:00 on the given date and a Datetime results.
    Otherwise a Date results.
Date - Date: PureDuration<seconds>, being the absolute distance between 0:00 on
    the given dates
Date - Duration: Date | Datetime. If the duration contains hours, minutes or
    seconds, it is subtracted from 00:00 on the given date and a Datetime
    results. Otherwise a Date results.
Datetime + Time: Datetime. Like Time + Datetime.
Datetime + Date: Datetime. Like Date + Datetime.
Datetime + Datetime: Datetime, equal to the second summand
Datetime - Datetime: PureDuration<seconds>

The following uses PureDuration and Duration, PureDuration being a subset of Duration. This distinction doesn't exist in the code explicitly. But it makes the signatures more informative.

Example:

>> pure = t1 - t0
pure.text -- "114 seconds"
>> mixed = 1.minute + 54.seconds
mixed.text -- "1 minute, 54 seconds"
>> purified1 = mixed.to("seconds")
purified1 -- "114 seconds"
>> purified2 = mixed.to("minutes")
purified2 -- "1.9 minutes"

PureDurations are easier to deal with when you want to do calculations. The main use of non-pure durations is to have a more legible return value of .text. – "1 minute, 54 seconds" instead of "1.9 minutes".

Number.<U>: PureDuration<U>
Duration.to(String = U): PureDuration<U>, where the number is rounded to two
    places after the comma
PureDuration<U>.text: String of format "<number> U"
Duration.text: String of format "<number> <unit>, <number> <unit>, …"

Duration + Duration: Duration
PureDuration<U> + PureDuration<U>: PureDuration<U>
Duration - Duration: Duration
PureDuration<U> - PureDuration<U>: PureDuration<U>
Duration * Number: Duration
PureDuration * Number: PureDuration