DateOnlyExtensions Class

Definition

Namespace: DataStandardizer.Chronology

Extension methods that convert a DateOnly to the system-time types UnixTime and DosDateTime.

public static class DateOnlyExtensions

Remarks

This class and its members require .NET 6 or later (they depend on DateOnly) and are not available on the .NET Standard targets. The whole class is gated behind #if NET6_0_OR_GREATER.

Methods

Extension

Method Extends Returns Notes
ToDosDateTime() DateOnly DosDateTime (net6.0+)
ToUnixTime() DateOnly UnixTime (net6.0+) Time of day taken as midnight.

Applies to

Available only on net8.0 and net10.0. Not available on netstandard1.0 or netstandard2.0 (requires DateOnly, net6.0+).

See also


This site uses Just the Docs, a documentation theme for Jekyll.