Show / Hide Table of Contents

Struct NpgsqlDate

Implements
System.IEquatable<NpgsqlDate>
System.IComparable<NpgsqlDate>
System.IComparable
System.Collections.Generic.IComparer<NpgsqlDate>
System.Collections.IComparer
Inherited Members
System.Object.Equals(System.Object, System.Object)
System.Object.ReferenceEquals(System.Object, System.Object)
System.Object.GetType()
Namespace: NpgsqlTypes
Assembly: Npgsql.dll
Syntax
[Serializable]
public struct NpgsqlDate : IEquatable<NpgsqlDate>, IComparable<NpgsqlDate>, IComparable, IComparer<NpgsqlDate>, IComparer

Constructors

NpgsqlDate(NpgsqlDate)

Declaration
public NpgsqlDate(NpgsqlDate copyFrom)
Parameters
Type Name Description
NpgsqlDate copyFrom

NpgsqlDate(DateTime)

Declaration
public NpgsqlDate(DateTime dateTime)
Parameters
Type Name Description
System.DateTime dateTime

NpgsqlDate(Int32, Int32, Int32)

Declaration
public NpgsqlDate(int year, int month, int day)
Parameters
Type Name Description
System.Int32 year
System.Int32 month
System.Int32 day

Fields

Epoch

Represents the date 1970-01-01

Declaration
public static readonly NpgsqlDate Epoch
Field Value
Type Description
NpgsqlDate

Era

Represents the date 0001-01-01

Declaration
public static readonly NpgsqlDate Era
Field Value
Type Description
NpgsqlDate

Infinity

Declaration
public static readonly NpgsqlDate Infinity
Field Value
Type Description
NpgsqlDate

MaxCalculableValue

Declaration
public static readonly NpgsqlDate MaxCalculableValue
Field Value
Type Description
NpgsqlDate

MaxYear

Declaration
public const int MaxYear = 5874897
Field Value
Type Description
System.Int32

MinCalculableValue

Declaration
public static readonly NpgsqlDate MinCalculableValue
Field Value
Type Description
NpgsqlDate

MinYear

Declaration
public const int MinYear = -4714
Field Value
Type Description
System.Int32

NegativeInfinity

Declaration
public static readonly NpgsqlDate NegativeInfinity
Field Value
Type Description
NpgsqlDate

Properties

Day

Declaration
public int Day { get; }
Property Value
Type Description
System.Int32

DayOfWeek

Declaration
public DayOfWeek DayOfWeek { get; }
Property Value
Type Description
System.DayOfWeek

DayOfYear

Declaration
public int DayOfYear { get; }
Property Value
Type Description
System.Int32

IsFinite

Declaration
public bool IsFinite { get; }
Property Value
Type Description
System.Boolean

IsInfinity

Declaration
public bool IsInfinity { get; }
Property Value
Type Description
System.Boolean

IsLeapYear

Declaration
public bool IsLeapYear { get; }
Property Value
Type Description
System.Boolean

IsNegativeInfinity

Declaration
public bool IsNegativeInfinity { get; }
Property Value
Type Description
System.Boolean

Month

Declaration
public int Month { get; }
Property Value
Type Description
System.Int32

Now

Declaration
public static NpgsqlDate Now { get; }
Property Value
Type Description
NpgsqlDate

Today

Declaration
public static NpgsqlDate Today { get; }
Property Value
Type Description
NpgsqlDate

Tomorrow

Declaration
public static NpgsqlDate Tomorrow { get; }
Property Value
Type Description
NpgsqlDate

Year

Declaration
public int Year { get; }
Property Value
Type Description
System.Int32

Yesterday

Declaration
public static NpgsqlDate Yesterday { get; }
Property Value
Type Description
NpgsqlDate

Methods

Add(NpgsqlTimeSpan)

Declaration
public NpgsqlDate Add(NpgsqlTimeSpan interval)
Parameters
Type Name Description
NpgsqlTimeSpan interval
Returns
Type Description
NpgsqlDate

AddDays(Int32)

Declaration
public NpgsqlDate AddDays(int days)
Parameters
Type Name Description
System.Int32 days
Returns
Type Description
NpgsqlDate

AddMonths(Int32)

Declaration
public NpgsqlDate AddMonths(int months)
Parameters
Type Name Description
System.Int32 months
Returns
Type Description
NpgsqlDate

AddYears(Int32)

Declaration
public NpgsqlDate AddYears(int years)
Parameters
Type Name Description
System.Int32 years
Returns
Type Description
NpgsqlDate

Compare(NpgsqlDate, NpgsqlDate)

Declaration
public int Compare(NpgsqlDate x, NpgsqlDate y)
Parameters
Type Name Description
NpgsqlDate x
NpgsqlDate y
Returns
Type Description
System.Int32

Compare(Object, Object)

Declaration
public int Compare(object x, object y)
Parameters
Type Name Description
System.Object x
System.Object y
Returns
Type Description
System.Int32

CompareTo(NpgsqlDate)

Declaration
public int CompareTo(NpgsqlDate other)
Parameters
Type Name Description
NpgsqlDate other
Returns
Type Description
System.Int32

CompareTo(Object)

Declaration
public int CompareTo(object o)
Parameters
Type Name Description
System.Object o
Returns
Type Description
System.Int32

Equals(NpgsqlDate)

Declaration
public bool Equals(NpgsqlDate other)
Parameters
Type Name Description
NpgsqlDate other
Returns
Type Description
System.Boolean

Equals(Object)

Declaration
public override bool Equals(object obj)
Parameters
Type Name Description
System.Object obj
Returns
Type Description
System.Boolean
Overrides
System.ValueType.Equals(System.Object)

GetHashCode()

Declaration
public override int GetHashCode()
Returns
Type Description
System.Int32
Overrides
System.ValueType.GetHashCode()

Parse(String)

Declaration
public static NpgsqlDate Parse(string str)
Parameters
Type Name Description
System.String str
Returns
Type Description
NpgsqlDate

Subtract(NpgsqlTimeSpan)

Declaration
public NpgsqlDate Subtract(NpgsqlTimeSpan interval)
Parameters
Type Name Description
NpgsqlTimeSpan interval
Returns
Type Description
NpgsqlDate

ToDateTime(NpgsqlDate)

Declaration
public static DateTime ToDateTime(NpgsqlDate date)
Parameters
Type Name Description
NpgsqlDate date
Returns
Type Description
System.DateTime

ToNpgsqlDate(DateTime)

Declaration
public static NpgsqlDate ToNpgsqlDate(DateTime date)
Parameters
Type Name Description
System.DateTime date
Returns
Type Description
NpgsqlDate

ToString()

Declaration
public override string ToString()
Returns
Type Description
System.String
Overrides
System.ValueType.ToString()

TryParse(String, out NpgsqlDate)

Declaration
public static bool TryParse(string str, out NpgsqlDate date)
Parameters
Type Name Description
System.String str
NpgsqlDate date
Returns
Type Description
System.Boolean

Operators

Addition(NpgsqlDate, NpgsqlTimeSpan)

Declaration
public static NpgsqlDate operator +(NpgsqlDate date, NpgsqlTimeSpan interval)
Parameters
Type Name Description
NpgsqlDate date
NpgsqlTimeSpan interval
Returns
Type Description
NpgsqlDate

Addition(NpgsqlTimeSpan, NpgsqlDate)

Declaration
public static NpgsqlDate operator +(NpgsqlTimeSpan interval, NpgsqlDate date)
Parameters
Type Name Description
NpgsqlTimeSpan interval
NpgsqlDate date
Returns
Type Description
NpgsqlDate

Equality(NpgsqlDate, NpgsqlDate)

Declaration
public static bool operator ==(NpgsqlDate x, NpgsqlDate y)
Parameters
Type Name Description
NpgsqlDate x
NpgsqlDate y
Returns
Type Description
System.Boolean

Explicit(NpgsqlDate to DateTime)

Declaration
public static explicit operator DateTime(NpgsqlDate date)
Parameters
Type Name Description
NpgsqlDate date
Returns
Type Description
System.DateTime

Explicit(DateTime to NpgsqlDate)

Declaration
public static explicit operator NpgsqlDate(DateTime date)
Parameters
Type Name Description
System.DateTime date
Returns
Type Description
NpgsqlDate

GreaterThan(NpgsqlDate, NpgsqlDate)

Declaration
public static bool operator>(NpgsqlDate x, NpgsqlDate y)
Parameters
Type Name Description
NpgsqlDate x
NpgsqlDate y
Returns
Type Description
System.Boolean

GreaterThanOrEqual(NpgsqlDate, NpgsqlDate)

Declaration
public static bool operator >=(NpgsqlDate x, NpgsqlDate y)
Parameters
Type Name Description
NpgsqlDate x
NpgsqlDate y
Returns
Type Description
System.Boolean

Inequality(NpgsqlDate, NpgsqlDate)

Declaration
public static bool operator !=(NpgsqlDate x, NpgsqlDate y)
Parameters
Type Name Description
NpgsqlDate x
NpgsqlDate y
Returns
Type Description
System.Boolean

LessThan(NpgsqlDate, NpgsqlDate)

Declaration
public static bool operator <(NpgsqlDate x, NpgsqlDate y)
Parameters
Type Name Description
NpgsqlDate x
NpgsqlDate y
Returns
Type Description
System.Boolean

LessThanOrEqual(NpgsqlDate, NpgsqlDate)

Declaration
public static bool operator <=(NpgsqlDate x, NpgsqlDate y)
Parameters
Type Name Description
NpgsqlDate x
NpgsqlDate y
Returns
Type Description
System.Boolean

Subtraction(NpgsqlDate, NpgsqlDate)

Declaration
public static NpgsqlTimeSpan operator -(NpgsqlDate dateX, NpgsqlDate dateY)
Parameters
Type Name Description
NpgsqlDate dateX
NpgsqlDate dateY
Returns
Type Description
NpgsqlTimeSpan

Subtraction(NpgsqlDate, NpgsqlTimeSpan)

Declaration
public static NpgsqlDate operator -(NpgsqlDate date, NpgsqlTimeSpan interval)
Parameters
Type Name Description
NpgsqlDate date
NpgsqlTimeSpan interval
Returns
Type Description
NpgsqlDate

Implements

System.IEquatable<T>
System.IComparable<T>
System.IComparable
System.Collections.Generic.IComparer<T>
System.Collections.IComparer
In This Article
Back to top Generated by DocFX