Search Results for

    Show / Hide Table of Contents

    Struct NpgsqlDate

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

    Constructors

    | Improve this Doc

    NpgsqlDate(NpgsqlDate)

    Declaration
    public NpgsqlDate(NpgsqlDate copyFrom)
    Parameters
    Type Name Description
    NpgsqlDate copyFrom
    | Improve this Doc

    NpgsqlDate(DateTime)

    Declaration
    public NpgsqlDate(DateTime dateTime)
    Parameters
    Type Name Description
    DateTime dateTime
    | Improve this Doc

    NpgsqlDate(Int32, Int32, Int32)

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

    Fields

    | Improve this Doc

    Epoch

    Represents the date 1970-01-01

    Declaration
    public static readonly NpgsqlDate Epoch
    Field Value
    Type Description
    NpgsqlDate
    | Improve this Doc

    Era

    Represents the date 0001-01-01

    Declaration
    public static readonly NpgsqlDate Era
    Field Value
    Type Description
    NpgsqlDate
    | Improve this Doc

    Infinity

    Declaration
    public static readonly NpgsqlDate Infinity
    Field Value
    Type Description
    NpgsqlDate
    | Improve this Doc

    MaxCalculableValue

    Declaration
    public static readonly NpgsqlDate MaxCalculableValue
    Field Value
    Type Description
    NpgsqlDate
    | Improve this Doc

    MaxYear

    Declaration
    public const int MaxYear = 5874897
    Field Value
    Type Description
    Int32
    | Improve this Doc

    MinCalculableValue

    Declaration
    public static readonly NpgsqlDate MinCalculableValue
    Field Value
    Type Description
    NpgsqlDate
    | Improve this Doc

    MinYear

    Declaration
    public const int MinYear = -4714
    Field Value
    Type Description
    Int32
    | Improve this Doc

    NegativeInfinity

    Declaration
    public static readonly NpgsqlDate NegativeInfinity
    Field Value
    Type Description
    NpgsqlDate

    Properties

    | Improve this Doc

    Day

    Declaration
    public readonly int Day { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    DayOfWeek

    Declaration
    public readonly DayOfWeek DayOfWeek { get; }
    Property Value
    Type Description
    DayOfWeek
    | Improve this Doc

    DayOfYear

    Declaration
    public readonly int DayOfYear { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    IsFinite

    Declaration
    public readonly bool IsFinite { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    IsInfinity

    Declaration
    public readonly bool IsInfinity { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    IsLeapYear

    Declaration
    public readonly bool IsLeapYear { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    IsNegativeInfinity

    Declaration
    public readonly bool IsNegativeInfinity { get; }
    Property Value
    Type Description
    Boolean
    | Improve this Doc

    Month

    Declaration
    public readonly int Month { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    Now

    Declaration
    public static readonly NpgsqlDate Now { get; }
    Property Value
    Type Description
    NpgsqlDate
    | Improve this Doc

    Today

    Declaration
    public static readonly NpgsqlDate Today { get; }
    Property Value
    Type Description
    NpgsqlDate
    | Improve this Doc

    Tomorrow

    Declaration
    public static readonly NpgsqlDate Tomorrow { get; }
    Property Value
    Type Description
    NpgsqlDate
    | Improve this Doc

    Year

    Declaration
    public readonly int Year { get; }
    Property Value
    Type Description
    Int32
    | Improve this Doc

    Yesterday

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

    Methods

    | Improve this Doc

    Add(NpgsqlTimeSpan)

    Declaration
    public readonly NpgsqlDate Add(NpgsqlTimeSpan interval)
    Parameters
    Type Name Description
    NpgsqlTimeSpan interval
    Returns
    Type Description
    NpgsqlDate
    | Improve this Doc

    AddDays(Int32)

    Declaration
    public readonly NpgsqlDate AddDays(int days)
    Parameters
    Type Name Description
    Int32 days
    Returns
    Type Description
    NpgsqlDate
    | Improve this Doc

    AddMonths(Int32)

    Declaration
    public readonly NpgsqlDate AddMonths(int months)
    Parameters
    Type Name Description
    Int32 months
    Returns
    Type Description
    NpgsqlDate
    | Improve this Doc

    AddYears(Int32)

    Declaration
    public readonly NpgsqlDate AddYears(int years)
    Parameters
    Type Name Description
    Int32 years
    Returns
    Type Description
    NpgsqlDate
    | Improve this Doc

    Compare(NpgsqlDate, NpgsqlDate)

    Declaration
    public readonly int Compare(NpgsqlDate x, NpgsqlDate y)
    Parameters
    Type Name Description
    NpgsqlDate x
    NpgsqlDate y
    Returns
    Type Description
    Int32
    | Improve this Doc

    Compare(Object, Object)

    Declaration
    public readonly int Compare(object x, object y)
    Parameters
    Type Name Description
    Object x
    Object y
    Returns
    Type Description
    Int32
    | Improve this Doc

    CompareTo(NpgsqlDate)

    Declaration
    public readonly int CompareTo(NpgsqlDate other)
    Parameters
    Type Name Description
    NpgsqlDate other
    Returns
    Type Description
    Int32
    | Improve this Doc

    CompareTo(Object)

    Declaration
    public readonly int CompareTo(object o)
    Parameters
    Type Name Description
    Object o
    Returns
    Type Description
    Int32
    | Improve this Doc

    Equals(NpgsqlDate)

    Declaration
    public readonly bool Equals(NpgsqlDate other)
    Parameters
    Type Name Description
    NpgsqlDate other
    Returns
    Type Description
    Boolean
    | Improve this Doc

    Equals(Object)

    Declaration
    public override readonly bool Equals(object obj)
    Parameters
    Type Name Description
    Object obj
    Returns
    Type Description
    Boolean
    Overrides
    ValueType.Equals(Object)
    | Improve this Doc

    GetHashCode()

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    Int32
    Overrides
    ValueType.GetHashCode()
    | Improve this Doc

    Parse(String)

    Declaration
    public static NpgsqlDate Parse(string str)
    Parameters
    Type Name Description
    String str
    Returns
    Type Description
    NpgsqlDate
    | Improve this Doc

    Subtract(NpgsqlTimeSpan)

    Declaration
    public readonly NpgsqlDate Subtract(NpgsqlTimeSpan interval)
    Parameters
    Type Name Description
    NpgsqlTimeSpan interval
    Returns
    Type Description
    NpgsqlDate
    | Improve this Doc

    ToDateTime(NpgsqlDate)

    Declaration
    public static DateTime ToDateTime(NpgsqlDate date)
    Parameters
    Type Name Description
    NpgsqlDate date
    Returns
    Type Description
    DateTime
    | Improve this Doc

    ToNpgsqlDate(DateTime)

    Declaration
    public static NpgsqlDate ToNpgsqlDate(DateTime date)
    Parameters
    Type Name Description
    DateTime date
    Returns
    Type Description
    NpgsqlDate
    | Improve this Doc

    ToString()

    Declaration
    public override readonly string ToString()
    Returns
    Type Description
    String
    Overrides
    ValueType.ToString()
    | Improve this Doc

    TryParse(String, out NpgsqlDate)

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

    Operators

    | Improve this Doc

    Addition(NpgsqlDate, NpgsqlTimeSpan)

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

    Addition(NpgsqlTimeSpan, NpgsqlDate)

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

    Equality(NpgsqlDate, NpgsqlDate)

    Declaration
    public static bool operator ==(NpgsqlDate x, NpgsqlDate y)
    Parameters
    Type Name Description
    NpgsqlDate x
    NpgsqlDate y
    Returns
    Type Description
    Boolean
    | Improve this Doc

    Explicit(NpgsqlDate to DateTime)

    Declaration
    public static explicit operator DateTime(NpgsqlDate date)
    Parameters
    Type Name Description
    NpgsqlDate date
    Returns
    Type Description
    DateTime
    | Improve this Doc

    Explicit(DateTime to NpgsqlDate)

    Declaration
    public static explicit operator NpgsqlDate(DateTime date)
    Parameters
    Type Name Description
    DateTime date
    Returns
    Type Description
    NpgsqlDate
    | Improve this Doc

    GreaterThan(NpgsqlDate, NpgsqlDate)

    Declaration
    public static bool operator>(NpgsqlDate x, NpgsqlDate y)
    Parameters
    Type Name Description
    NpgsqlDate x
    NpgsqlDate y
    Returns
    Type Description
    Boolean
    | Improve this Doc

    GreaterThanOrEqual(NpgsqlDate, NpgsqlDate)

    Declaration
    public static bool operator >=(NpgsqlDate x, NpgsqlDate y)
    Parameters
    Type Name Description
    NpgsqlDate x
    NpgsqlDate y
    Returns
    Type Description
    Boolean
    | Improve this Doc

    Inequality(NpgsqlDate, NpgsqlDate)

    Declaration
    public static bool operator !=(NpgsqlDate x, NpgsqlDate y)
    Parameters
    Type Name Description
    NpgsqlDate x
    NpgsqlDate y
    Returns
    Type Description
    Boolean
    | Improve this Doc

    LessThan(NpgsqlDate, NpgsqlDate)

    Declaration
    public static bool operator <(NpgsqlDate x, NpgsqlDate y)
    Parameters
    Type Name Description
    NpgsqlDate x
    NpgsqlDate y
    Returns
    Type Description
    Boolean
    | Improve this Doc

    LessThanOrEqual(NpgsqlDate, NpgsqlDate)

    Declaration
    public static bool operator <=(NpgsqlDate x, NpgsqlDate y)
    Parameters
    Type Name Description
    NpgsqlDate x
    NpgsqlDate y
    Returns
    Type Description
    Boolean
    | Improve this Doc

    Subtraction(NpgsqlDate, NpgsqlDate)

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

    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
    • Improve this Doc
    In This Article
    Back to top © Copyright 2021 The Npgsql Development Team