Table of Contents

Class DateGenerator

Namespace
Hegel.Temporal
Assembly
Hegel.dll

Draws dates, shrinking toward 2000-01-01. See Dates() for how bad arguments are reported.

public sealed class DateGenerator : ValueGenerator<DateOnly>
Inheritance
DateGenerator
Inherited Members

Methods

DoDraw(TestCase)

Draw one value. Called inside a span labelled Label: draw from another generator through DrawSilent<T>(Generator<T>), which opens its span, rather than by calling its hook.

protected override DateOnly DoDraw(TestCase tc)

Parameters

tc TestCase

Returns

DateOnly

Max(DateOnly)

No later than max.

public DateGenerator Max(DateOnly max)

Parameters

max DateOnly

Returns

DateGenerator

Exceptions

ArgumentException

The settings given so far allow no date.

Min(DateOnly)

No earlier than min.

public DateGenerator Min(DateOnly min)

Parameters

min DateOnly

Returns

DateGenerator

Exceptions

ArgumentException

The settings given so far allow no date.

Months(params int[])

Only dates in one of months, numbered from 1 for January.

public DateGenerator Months(params int[] months)

Parameters

months int[]

Returns

DateGenerator

Exceptions

ArgumentException

months is empty or holds a number that is no month, or the settings given so far allow no date.

Weekdays(params DayOfWeek[])

Only dates falling on one of days.

public DateGenerator Weekdays(params DayOfWeek[] days)

Parameters

days DayOfWeek[]

Returns

DateGenerator

Exceptions

ArgumentException

days is empty or holds a value that is no day, or the settings given so far allow no date.