Header menu logo bristlecone

DateTime Module

Helper functions for working with
 `DateTime` values.

Functions and values

Function or value Description

fractionalDifference isSigned d1 d2

Full Usage: fractionalDifference isSigned d1 d2

Parameters:
Returns: TimeDifference<TimeSpan>
isSigned : bool
d1 : DateTime
d2 : DateTime
Returns: TimeDifference<TimeSpan>

totalMonthsElapsed d1 d2

Full Usage: totalMonthsElapsed d1 d2

Parameters:
Returns: float<MeasureProduct<month, MeasureOne>> The fraction of years elapsed between the two dates

Calculates the fractional number of total months elapsed between two dates.

d1 : DateTime

The first date

d2 : DateTime

The second date

Returns: float<MeasureProduct<month, MeasureOne>>

The fraction of years elapsed between the two dates

totalYearsElapsed d1 d2

Full Usage: totalYearsElapsed d1 d2

Parameters:
Returns: float<MeasureProduct<year, MeasureOne>> The fraction of years elapsed between the two dates

Calculates the years elapsed between two dates, from the earlier to the later date. The algorithm ignores leap year days (truncation occurs for the 29th Feburary).

d1 : DateTime

The first date

d2 : DateTime

The second date

Returns: float<MeasureProduct<year, MeasureOne>>

The fraction of years elapsed between the two dates

totalYearsElapsedFraction d1 d2

Full Usage: totalYearsElapsedFraction d1 d2

Parameters:
Returns: float

Calculates the fractional number of years elapsed between two dates. The basis used is actual/actual.

d1 : DateTime
d2 : DateTime
Returns: float

Type something to start searching.