Table of Contents

Struct Date

Namespace
ParquetSharp
Assembly
ParquetSharp.dll

Represent a Parquet 32-bit date, based around 1970-01-01.

public readonly struct Date : IEquatable<Date>, IComparable, IComparable<Date>
Implements
Inherited Members

Constructors

Date(DateTime)

public Date(DateTime dateTime)

Parameters

dateTime DateTime

Date(int)

public Date(int days)

Parameters

days int

Date(int, int, int)

public Date(int year, int month, int day)

Parameters

year int
month int
day int

Fields

Days

public readonly int Days

Field Value

int

Properties

DateTime

public DateTime DateTime { get; }

Property Value

DateTime

Methods

AddDays(int)

public Date AddDays(int days)

Parameters

days int

Returns

Date

CompareTo(Date)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(Date other)

Parameters

other Date

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes other in the sort order.
Zero This instance occurs in the same position in the sort order as other.
Greater than zero This instance follows other in the sort order.

CompareTo(object?)

Compares the current instance with another object of the same type and returns an integer that indicates whether the current instance precedes, follows, or occurs in the same position in the sort order as the other object.

public int CompareTo(object? obj)

Parameters

obj object

An object to compare with this instance.

Returns

int

A value that indicates the relative order of the objects being compared. The return value has these meanings:

Value Meaning
Less than zero This instance precedes obj in the sort order.
Zero This instance occurs in the same position in the sort order as obj.
Greater than zero This instance follows obj in the sort order.

Exceptions

ArgumentException

obj is not the same type as this instance.

Equals(Date)

Indicates whether the current object is equal to another object of the same type.

public bool Equals(Date other)

Parameters

other Date

An object to compare with this object.

Returns

bool

true if the current object is equal to the other parameter; otherwise, false.

Equals(object?)

Indicates whether this instance and a specified object are equal.

public override bool Equals(object? obj)

Parameters

obj object

The object to compare with the current instance.

Returns

bool

true if obj and this instance are the same type and represent the same value; otherwise, false.

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.

ToString()

Returns the fully qualified type name of this instance.

public override string ToString()

Returns

string

The fully qualified type name.