Documentation Index
Fetch the complete documentation index at: https://mintlify.com/atulin/forged/llms.txt
Use this file to discover all available pages before exploring further.
ForgeTemporal groups all date and time generation under the f.Temporal accessor. It covers all five temporal types in modern .NET — DateTime, DateOnly, TimeOnly, DateTimeOffset, and TimeSpan — and provides between, past, and future variants where applicable so you can express temporal intent directly without manually computing bounds. When a boundary is omitted (passed as null), the method falls back to a sensible default: Past and Future methods default to a one-year window relative to UtcNow, while unconstrained Between methods fall back to the type’s absolute MinValue / MaxValue.
Note onDateTimekind — all generatedDateTimevalues useDateTimeKind.Utc. Similarly, allDateTimeOffsetvalues are generated with a UTC offset ofTimeSpan.Zero.
Between
Produces a randomDateTime anywhere within the supplied [min, max] window.
The earliest possible value (inclusive). Defaults to
DateTime.MinValue when null.The latest possible value (inclusive). Defaults to
DateTime.MaxValue when null.A random
DateTime (UTC) within the specified range.Past
Produces a randomDateTime between earliest and DateTime.UtcNow.
The lower bound of the generated range. When
null, defaults to approximately one
year before the current UTC time.A random
DateTime (UTC) no later than the moment the value is generated.Future
Produces a randomDateTime between DateTime.UtcNow and latest.
The upper bound of the generated range. When
null, defaults to approximately one
year after the current UTC time.A random
DateTime (UTC) no earlier than the moment the value is generated.DateBetween
Produces a randomDateOnly within a [min, max] range (no time component).
The earliest date (inclusive). Defaults to
DateOnly.MinValue when null.The latest date (inclusive). Defaults to
DateOnly.MaxValue when null.A random
DateOnly within the specified range.DateInPast
Produces a randomDateOnly between earliest and today’s UTC date.
The lower date bound. When
null, defaults to approximately one year before today.A random past
DateOnly no later than today’s UTC date.DateInFuture
Produces a randomDateOnly from today’s UTC date up to latest.
The upper date bound. When
null, defaults to approximately one year from today.A random future
DateOnly no earlier than today’s UTC date.TimeBetween
Produces a randomTimeOnly within a [min, max] range.
The earliest time (inclusive). Defaults to
TimeOnly.MinValue (00:00:00) when null.The latest time (inclusive). Defaults to
TimeOnly.MaxValue (23:59:59.9999999) when null.A random
TimeOnly within the specified range.DateTimeOffsetBetween
Produces a randomDateTimeOffset within a [min, max] window. Generated values always carry a UTC offset of TimeSpan.Zero.
The earliest offset date/time (inclusive). Defaults to
DateTimeOffset.MinValue when null.The latest offset date/time (inclusive). Defaults to
DateTimeOffset.MaxValue when null.A random
DateTimeOffset (UTC offset zero) within the specified range.DateTimeOffsetInPast
Produces a randomDateTimeOffset between earliest and DateTimeOffset.UtcNow.
Lower bound of the range. When
null, defaults to approximately one year before now.A random past
DateTimeOffset (UTC) no later than the current moment.DateTimeOffsetInFuture
Produces a randomDateTimeOffset between DateTimeOffset.UtcNow and latest.
Upper bound of the range. When
null, defaults to approximately one year from now.A random future
DateTimeOffset (UTC) no earlier than the current moment.TimeSpanBetween
Produces a randomTimeSpan duration within a [min, max] range.
The shortest duration (inclusive). Defaults to
TimeSpan.MinValue when null.The longest duration (inclusive). Defaults to
TimeSpan.MaxValue when null.A random
TimeSpan within the specified range.