Class BoundsExtensions
- Namespace
- LfrlAnvil.Chrono.Extensions
- Assembly
- LfrlAnvil.Chrono.dll
Contains Bounds<T> extension methods.
public static class BoundsExtensions
- Inheritance
-
BoundsExtensions
- Inherited Members
Methods
GetDuration(Bounds<ZonedDateTime>)
Calculates the Duration of the provided source
.
[Pure]
public static Duration GetDuration(this Bounds<ZonedDateTime> source)
Parameters
source
Bounds<ZonedDateTime>Source bounds.
Returns
GetGreedyPeriod(Bounds<ZonedDateTime>, PeriodUnits)
Calculates the Period of the provided source
, using the specified units
.
[Pure]
public static Period GetGreedyPeriod(this Bounds<ZonedDateTime> source, PeriodUnits units)
Parameters
source
Bounds<ZonedDateTime>Source bounds.
units
PeriodUnitsPeriodUnits to include in the calculated difference.
Returns
Remarks
Greedy Period may contain components with negative values.
GetGreedyPeriod(Bounds<ZonedDay>, PeriodUnits)
Calculates the Period of the provided source
, using the specified units
.
[Pure]
public static Period GetGreedyPeriod(this Bounds<ZonedDay> source, PeriodUnits units)
Parameters
source
Bounds<ZonedDay>Source bounds.
units
PeriodUnitsPeriodUnits to include in the calculated difference.
Returns
Remarks
Greedy Period may contain components with negative values.
GetGreedyPeriod(Bounds<DateTime>, PeriodUnits)
Calculates the Period of the provided source
, using the specified units
.
[Pure]
public static Period GetGreedyPeriod(this Bounds<DateTime> source, PeriodUnits units)
Parameters
source
Bounds<DateTime>Source bounds.
units
PeriodUnitsPeriodUnits to include in the calculated difference.
Returns
Remarks
Greedy Period may contain components with negative values.
GetPeriod(Bounds<ZonedDateTime>, PeriodUnits)
Calculates the Period of the provided source
, using the specified units
.
[Pure]
public static Period GetPeriod(this Bounds<ZonedDateTime> source, PeriodUnits units)
Parameters
source
Bounds<ZonedDateTime>Source bounds.
units
PeriodUnitsPeriodUnits to include in the calculated difference.
Returns
GetPeriod(Bounds<ZonedDay>, PeriodUnits)
Calculates the Period of the provided source
, using the specified units
.
[Pure]
public static Period GetPeriod(this Bounds<ZonedDay> source, PeriodUnits units)
Parameters
source
Bounds<ZonedDay>Source bounds.
units
PeriodUnitsPeriodUnits to include in the calculated difference.
Returns
GetPeriod(Bounds<DateTime>, PeriodUnits)
Calculates the Period of the provided source
, using the specified units
.
[Pure]
public static Period GetPeriod(this Bounds<DateTime> source, PeriodUnits units)
Parameters
source
Bounds<DateTime>Source bounds.
units
PeriodUnitsPeriodUnits to include in the calculated difference.
Returns
GetTimeSpan(Bounds<DateTime>)
Calculates the TimeSpan of the provided source
.
[Pure]
public static TimeSpan GetTimeSpan(this Bounds<DateTime> source)