Table of Contents

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

Duration

New Duration instance.

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 PeriodUnits

PeriodUnits to include in the calculated difference.

Returns

Period

New Period instance.

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 PeriodUnits

PeriodUnits to include in the calculated difference.

Returns

Period

New Period instance.

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 PeriodUnits

PeriodUnits to include in the calculated difference.

Returns

Period

New Period instance.

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 PeriodUnits

PeriodUnits to include in the calculated difference.

Returns

Period

New Period instance.

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 PeriodUnits

PeriodUnits to include in the calculated difference.

Returns

Period

New Period instance.

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 PeriodUnits

PeriodUnits to include in the calculated difference.

Returns

Period

New Period instance.

GetTimeSpan(Bounds<DateTime>)

Calculates the TimeSpan of the provided source.

[Pure]
public static TimeSpan GetTimeSpan(this Bounds<DateTime> source)

Parameters

source Bounds<DateTime>

Source bounds.

Returns

TimeSpan

New TimeSpan instance.