UNPKG

timezonecomplete

Version:

DateTime, TimeZone, Duration and Period library aimed at providing a consistent and complete date-time interface, away from the original JavaScript Date class.

37 lines (36 loc) 1.48 kB
/** * Copyright(c) 2014 ABB Switzerland Ltd. * * Global functions depending on DateTime/Duration etc */ import { DateTime } from "./datetime"; import { Duration } from "./duration"; /** * Returns the minimum of two DateTimes * @throws timezonecomplete.Argument.D1 if d1 is undefined/null * @throws timezonecomplete.Argument.D2 if d1 is undefined/null, or if d1 and d2 are not both datetimes */ export declare function min(d1: DateTime, d2: DateTime): DateTime; /** * Returns the minimum of two Durations * @throws timezonecomplete.Argument.D1 if d1 is undefined/null * @throws timezonecomplete.Argument.D2 if d1 is undefined/null, or if d1 and d2 are not both datetimes */ export declare function min(d1: Duration, d2: Duration): Duration; /** * Returns the maximum of two DateTimes * @throws timezonecomplete.Argument.D1 if d1 is undefined/null * @throws timezonecomplete.Argument.D2 if d1 is undefined/null, or if d1 and d2 are not both datetimes */ export declare function max(d1: DateTime, d2: DateTime): DateTime; /** * Returns the maximum of two Durations * @throws timezonecomplete.Argument.D1 if d1 is undefined/null * @throws timezonecomplete.Argument.D2 if d1 is undefined/null, or if d1 and d2 are not both datetimes */ export declare function max(d1: Duration, d2: Duration): Duration; /** * Returns the absolute value of a Duration * @throws timezonecomplete.Argument.D if d is undefined/null */ export declare function abs(d: Duration): Duration;