Class
DayInterval

Defines an interval of one day.

Definition

Constructors

DayInterval()

Declaration

cs-api-definition
public DayInterval()

Properties

Formatters

Gets a collection of formatters used to convert DateTime objects to specific strings.

Declaration

cs-api-definition
public override Func<DateTime, string>[] Formatters { get; }

Property Value

Func<DateTime, string>[]

A collection of formatters.

Overrides IntervalBase.Formatters

Remarks

The Formatters collection is used when CurrentIntervalSpan equals 1; otherwise, the IntervalSpanFormatters collection is used.

MinimumPeriodLength

Gets the smallest interval period.

Declaration

cs-api-definition
public override TimeSpan MinimumPeriodLength { get; }

Property Value

TimeSpan

The smallest interval period.

Overrides IntervalBase.MinimumPeriodLength

Methods

ExtractIntervalStart(DateTime)

Extracts the interval start from a specified DateTime object.

Declaration

cs-api-definition
public override DateTime ExtractIntervalStart(DateTime date)

Parameters

date

DateTime

The DateTime object.

Returns

DateTime

The interval start date.

Overrides IntervalBase.ExtractIntervalStart(DateTime)

IncrementByInterval(DateTime, int)

Increments a specified DateTime object by a specified number of MinimumPeriodLengths.

Declaration

cs-api-definition
public override DateTime IncrementByInterval(DateTime date, int intervalSpan)

Parameters

date

DateTime

The DateTime object.

intervalSpan

int

The number of MinimumPeriodLengths.

Returns

DateTime

The incremented DateTime object.

Overrides IntervalBase.IncrementByInterval(DateTime, int)