Struct DuckDBDateOnly
public readonly struct DuckDBDateOnly : IEquatable<DuckDBDateOnly>
- Implements
- Inherited Members
Constructors
DuckDBDateOnly(int, byte, byte)
public DuckDBDateOnly(int year, byte month, byte day)
Parameters
Fields
NegativeInfinity
Represents negative infinity for DuckDB dates.
public static readonly DuckDBDateOnly NegativeInfinity
Field Value
PositiveInfinity
Represents positive infinity for DuckDB dates.
public static readonly DuckDBDateOnly PositiveInfinity
Field Value
Properties
Day
public byte Day { get; }
Property Value
IsInfinity
Returns true if this date represents positive or negative infinity.
public bool IsInfinity { get; }
Property Value
IsNegativeInfinity
Returns true if this date represents negative infinity.
public bool IsNegativeInfinity { get; }
Property Value
IsPositiveInfinity
Returns true if this date represents positive infinity.
public bool IsPositiveInfinity { get; }
Property Value
Month
public byte Month { get; }
Property Value
Year
public int Year { get; }
Property Value
Methods
Equals(DuckDBDateOnly)
Indicates whether the current object is equal to another object of the same type.
public bool Equals(DuckDBDateOnly other)
Parameters
otherDuckDBDateOnlyAn object to compare with this object.
Returns
Equals(object?)
Indicates whether this instance and a specified object are equal.
public override bool Equals(object? obj)
Parameters
objobjectThe object to compare with the current instance.
Returns
- bool
true if
objand this instance are the same type and represent the same value; otherwise, false.
FromDateOnly(DateOnly)
public static DuckDBDateOnly FromDateOnly(DateOnly dateOnly)
Parameters
dateOnlyDateOnly
Returns
FromDateTime(DateTime)
public static DuckDBDateOnly FromDateTime(DateTime dateTime)
Parameters
dateTimeDateTime
Returns
FromDuckDBDate(DuckDBDate)
Converts a DuckDBDate to DuckDBDateOnly, handling infinity values.
public static DuckDBDateOnly FromDuckDBDate(DuckDBDate date)
Parameters
dateDuckDBDate
Returns
GetHashCode()
Returns the hash code for this instance.
public override int GetHashCode()
Returns
- int
A 32-bit signed integer that is the hash code for this instance.
ToDateOnly()
public DateOnly ToDateOnly()
Returns
ToDateTime()
public DateTime ToDateTime()
Returns
ToDuckDBDate()
Converts this DuckDBDateOnly to a DuckDBDate, handling infinity values.
public DuckDBDate ToDuckDBDate()
Returns
Operators
explicit operator DateTime(DuckDBDateOnly)
public static explicit operator DateTime(DuckDBDateOnly dateOnly)
Parameters
dateOnlyDuckDBDateOnly
Returns
explicit operator DuckDBDateOnly(DateTime)
public static explicit operator DuckDBDateOnly(DateTime dateTime)
Parameters
dateTimeDateTime
Returns
implicit operator DateOnly(DuckDBDateOnly)
public static implicit operator DateOnly(DuckDBDateOnly dateOnly)
Parameters
dateOnlyDuckDBDateOnly
Returns
implicit operator DuckDBDateOnly(DateOnly)
public static implicit operator DuckDBDateOnly(DateOnly date)
Parameters
dateDateOnly