Search Results for

    Show / Hide Table of Contents

    Struct UnixTime

    A long value that acts as a DateTime object. (DateTime??媛€?ν븳 long 媛?

    Implements
    IComparable
    IComparable<UnixTime>
    IEquatable<UnixTime>
    Inherited Members
    object.Equals(object, object)
    object.GetType()
    object.ReferenceEquals(object, object)
    Namespace: Glitch9
    Assembly: Glitch9.dll
    Syntax
    [Serializable]
    [JsonConverter(typeof(UnixTimeJsonConverter))]
    public struct UnixTime : IComparable, IComparable<UnixTime>, IEquatable<UnixTime>

    Constructors

    | Edit this page View Source

    UnixTime(DateTime, bool)

    Declaration
    public UnixTime(DateTime dateTime, bool toUniversalTime = true)
    Parameters
    Type Name Description
    DateTime dateTime
    bool toUniversalTime
    | Edit this page View Source

    UnixTime(int, int, int)

    Declaration
    public UnixTime(int year, int month, int day)
    Parameters
    Type Name Description
    int year
    int month
    int day
    | Edit this page View Source

    UnixTime(int, int, int, int, int, int)

    Declaration
    public UnixTime(int year, int month, int day, int hour, int minute, int second)
    Parameters
    Type Name Description
    int year
    int month
    int day
    int hour
    int minute
    int second
    | Edit this page View Source

    UnixTime(long)

    Declaration
    public UnixTime(long unixTimestamp)
    Parameters
    Type Name Description
    long unixTimestamp
    | Edit this page View Source

    UnixTime(string)

    Declaration
    public UnixTime(string dateAsString)
    Parameters
    Type Name Description
    string dateAsString

    Fields

    | Edit this page View Source

    UnixEpoch

    Declaration
    public static readonly DateTime UnixEpoch
    Field Value
    Type Description
    DateTime

    Properties

    | Edit this page View Source

    Date

    Declaration
    public readonly UnixTime Date { get; }
    Property Value
    Type Description
    UnixTime
    | Edit this page View Source

    Day

    Declaration
    public readonly int Day { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Default

    Declaration
    public static UnixTime Default { get; }
    Property Value
    Type Description
    UnixTime
    | Edit this page View Source

    Empty

    Declaration
    public static UnixTime Empty { get; }
    Property Value
    Type Description
    UnixTime
    | Edit this page View Source

    Hour

    Declaration
    public readonly int Hour { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    IsEmpty

    Declaration
    public readonly bool IsEmpty { get; }
    Property Value
    Type Description
    bool
    | Edit this page View Source

    MaxValue

    Declaration
    public static UnixTime MaxValue { get; }
    Property Value
    Type Description
    UnixTime
    | Edit this page View Source

    MinValue

    Declaration
    public static UnixTime MinValue { get; }
    Property Value
    Type Description
    UnixTime
    | Edit this page View Source

    Minute

    Declaration
    public readonly int Minute { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Month

    Declaration
    public readonly int Month { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Now

    Declaration
    public static UnixTime Now { get; }
    Property Value
    Type Description
    UnixTime
    | Edit this page View Source

    Second

    Declaration
    public readonly int Second { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Ticks

    Declaration
    public readonly int Ticks { get; }
    Property Value
    Type Description
    int
    | Edit this page View Source

    Today

    Declaration
    public static UnixTime Today { get; }
    Property Value
    Type Description
    UnixTime
    | Edit this page View Source

    Value

    Declaration
    public readonly long Value { get; }
    Property Value
    Type Description
    long
    | Edit this page View Source

    Year

    Declaration
    public readonly int Year { get; }
    Property Value
    Type Description
    int

    Methods

    | Edit this page View Source

    Add(UnixTime)

    Declaration
    public readonly TimeSpan Add(UnixTime b)
    Parameters
    Type Name Description
    UnixTime b
    Returns
    Type Description
    TimeSpan
    | Edit this page View Source

    AddDays(long)

    Declaration
    public readonly UnixTime AddDays(long days)
    Parameters
    Type Name Description
    long days
    Returns
    Type Description
    UnixTime
    | Edit this page View Source

    AddHours(long)

    Declaration
    public readonly UnixTime AddHours(long hours)
    Parameters
    Type Name Description
    long hours
    Returns
    Type Description
    UnixTime
    | Edit this page View Source

    AddMinutes(long)

    Declaration
    public readonly UnixTime AddMinutes(long minutes)
    Parameters
    Type Name Description
    long minutes
    Returns
    Type Description
    UnixTime
    | Edit this page View Source

    AddSeconds(long)

    Declaration
    public UnixTime AddSeconds(long seconds)
    Parameters
    Type Name Description
    long seconds
    Returns
    Type Description
    UnixTime
    | Edit this page View Source

    Compare(UnixTime, UnixTime)

    Declaration
    public static int Compare(UnixTime a, UnixTime b)
    Parameters
    Type Name Description
    UnixTime a
    UnixTime b
    Returns
    Type Description
    int
    | Edit this page View Source

    CompareTo(UnixTime)

    Declaration
    public readonly int CompareTo(UnixTime other)
    Parameters
    Type Name Description
    UnixTime other
    Returns
    Type Description
    int
    | Edit this page View Source

    CompareTo(DateTime)

    Declaration
    public readonly int CompareTo(DateTime other)
    Parameters
    Type Name Description
    DateTime other
    Returns
    Type Description
    int
    | Edit this page View Source

    CompareTo(long)

    Declaration
    public readonly int CompareTo(long other)
    Parameters
    Type Name Description
    long other
    Returns
    Type Description
    int
    | Edit this page View Source

    CompareTo(object)

    Declaration
    public readonly int CompareTo(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    int
    | Edit this page View Source

    Equals(UnixTime)

    Declaration
    public readonly bool Equals(UnixTime other)
    Parameters
    Type Name Description
    UnixTime other
    Returns
    Type Description
    bool
    | Edit this page View Source

    Equals(object)

    Declaration
    public override readonly bool Equals(object obj)
    Parameters
    Type Name Description
    object obj
    Returns
    Type Description
    bool
    Overrides
    ValueType.Equals(object)
    | Edit this page View Source

    FromDateTime(DateTime?)

    Declaration
    public static UnixTime FromDateTime(DateTime? dateTime)
    Parameters
    Type Name Description
    DateTime? dateTime
    Returns
    Type Description
    UnixTime
    | Edit this page View Source

    GetDisplayName(CultureInfo)

    Declaration
    public readonly string GetDisplayName(CultureInfo cultureInfo = null)
    Parameters
    Type Name Description
    CultureInfo cultureInfo
    Returns
    Type Description
    string
    | Edit this page View Source

    GetHashCode()

    Declaration
    public override readonly int GetHashCode()
    Returns
    Type Description
    int
    Overrides
    ValueType.GetHashCode()
    | Edit this page View Source

    Subtract(UnixTime)

    Declaration
    public readonly TimeSpan Subtract(UnixTime b)
    Parameters
    Type Name Description
    UnixTime b
    Returns
    Type Description
    TimeSpan
    | Edit this page View Source

    ToDateTime()

    Declaration
    public readonly DateTime ToDateTime()
    Returns
    Type Description
    DateTime
    | Edit this page View Source

    ToLocalTime()

    Declaration
    public readonly DateTime ToLocalTime()
    Returns
    Type Description
    DateTime
    | Edit this page View Source

    ToString()

    Declaration
    public override readonly string ToString()
    Returns
    Type Description
    string
    Overrides
    ValueType.ToString()
    | Edit this page View Source

    ToString(string)

    Declaration
    public readonly string ToString(string format)
    Parameters
    Type Name Description
    string format
    Returns
    Type Description
    string
    | Edit this page View Source

    ToString(string, string)

    Declaration
    public readonly string ToString(string format, string currentYearFormat)
    Parameters
    Type Name Description
    string format
    string currentYearFormat
    Returns
    Type Description
    string

    Operators

    | Edit this page View Source

    operator +(UnixTime, UnixTime)

    Declaration
    public static TimeSpan operator +(UnixTime a, UnixTime b)
    Parameters
    Type Name Description
    UnixTime a
    UnixTime b
    Returns
    Type Description
    TimeSpan
    | Edit this page View Source

    operator ==(UnixTime, UnixTime)

    Declaration
    public static bool operator ==(UnixTime a, UnixTime b)
    Parameters
    Type Name Description
    UnixTime a
    UnixTime b
    Returns
    Type Description
    bool
    | Edit this page View Source

    explicit operator DateTime(UnixTime)

    Declaration
    public static explicit operator DateTime(UnixTime unixTime)
    Parameters
    Type Name Description
    UnixTime unixTime
    Returns
    Type Description
    DateTime
    | Edit this page View Source

    operator >(UnixTime, UnixTime)

    Declaration
    public static bool operator >(UnixTime a, UnixTime b)
    Parameters
    Type Name Description
    UnixTime a
    UnixTime b
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator >=(UnixTime, UnixTime)

    Declaration
    public static bool operator >=(UnixTime a, UnixTime b)
    Parameters
    Type Name Description
    UnixTime a
    UnixTime b
    Returns
    Type Description
    bool
    | Edit this page View Source

    implicit operator long(UnixTime)

    Declaration
    public static implicit operator long(UnixTime unixTime)
    Parameters
    Type Name Description
    UnixTime unixTime
    Returns
    Type Description
    long
    | Edit this page View Source

    implicit operator UnixTime(DateTime)

    Declaration
    public static implicit operator UnixTime(DateTime dateTime)
    Parameters
    Type Name Description
    DateTime dateTime
    Returns
    Type Description
    UnixTime
    | Edit this page View Source

    implicit operator UnixTime(long)

    Declaration
    public static implicit operator UnixTime(long unixTimestamp)
    Parameters
    Type Name Description
    long unixTimestamp
    Returns
    Type Description
    UnixTime
    | Edit this page View Source

    operator !=(UnixTime, UnixTime)

    Declaration
    public static bool operator !=(UnixTime a, UnixTime b)
    Parameters
    Type Name Description
    UnixTime a
    UnixTime b
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator <(UnixTime, UnixTime)

    Declaration
    public static bool operator <(UnixTime a, UnixTime b)
    Parameters
    Type Name Description
    UnixTime a
    UnixTime b
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator <=(UnixTime, UnixTime)

    Declaration
    public static bool operator <=(UnixTime a, UnixTime b)
    Parameters
    Type Name Description
    UnixTime a
    UnixTime b
    Returns
    Type Description
    bool
    | Edit this page View Source

    operator -(UnixTime, UnixTime)

    Declaration
    public static TimeSpan operator -(UnixTime a, UnixTime b)
    Parameters
    Type Name Description
    UnixTime a
    UnixTime b
    Returns
    Type Description
    TimeSpan

    Implements

    IComparable
    IComparable<T>
    IEquatable<T>

    Extension Methods

    EventExtensions.ToDelta<T>(T, string, int, string, bool)
    EventExtensions.ToDone<T>(T, string, int, string)
    EventExtensions.ToEvent<T>(T)
    EventExtensions.UpcastDelta<T1, T2>(T1, string, int, string, bool)
    FallbackExtensions.IsOr<TParent, TChild>(TParent, TChild)
    ResponseCastingExtensions.GetResult<T>(T)
    SystemExtensions.GetHashCodeOrDefault<T>(T)
    SystemExtensions.GetName(object)
    • Edit this page
    • View Source
    In this article
    Back to top AI DevKit Documentation