Show / Hide Table of Contents

Class TimeConverterHelper

Helper class for TimeConverter.

Inheritance
object
TimeConverterHelper
Inherited Members
object.ToString()
object.Equals(object)
object.Equals(object, object)
object.ReferenceEquals(object, object)
object.GetHashCode()
object.GetType()
object.MemberwiseClone()
Namespace: SuperOffice.Util
Assembly: SoCore.dll
Syntax
public static class TimeConverterHelper

Properties

MaxValidDateLocal

Return the highest valid date. This DateTime has Kind = Local

Declaration
public static DateTime MaxValidDateLocal { get; }
Property Value
Type Description
DateTime

MaxValidDateUtc

Return the highest valid date, Kind = Utc, but the Ticks value is the same as for the Local variant

Declaration
public static DateTime MaxValidDateUtc { get; }
Property Value
Type Description
DateTime

TimeBaseDb

Return the datetime value that is used in the database, to represent "lowest possible date"

Declaration
public static DateTime TimeBaseDb { get; }
Property Value
Type Description
DateTime

TimeBaseLocal

Return the lowest valid date, 1.1.1970. This DateTime has Kind = Local

Declaration
public static DateTime TimeBaseLocal { get; }
Property Value
Type Description
DateTime

TimeBaseUtc

Return the lowest valid date, 1.1.1970. This DateTime has Kind = Utc, but the Ticks value is the same as for the Local variant

Declaration
public static DateTime TimeBaseUtc { get; }
Property Value
Type Description
DateTime

Methods

CoerceMinDateToYearZero(object)

Helper class for TimeConverter.

Declaration
public static object CoerceMinDateToYearZero(object maybeDateTime)
Parameters
Type Name Description
object maybeDateTime
Returns
Type Description
object

IsYearZero(DateTime)

Helper class for TimeConverter.

Declaration
public static bool IsYearZero(this DateTime dateTime)
Parameters
Type Name Description
DateTime dateTime
Returns
Type Description
bool

IsYearZeroOrMinValue(DateTime)

Checks if dateTime is YearZero or MinValue.

Declaration
public static bool IsYearZeroOrMinValue(this DateTime dateTime)
Parameters
Type Name Description
DateTime dateTime
Returns
Type Description
bool

IsZeroOrMinValue(TimeSpan)

Checks if dateTime is YearZero or MinValue.

Declaration
public static bool IsZeroOrMinValue(this TimeSpan ts)
Parameters
Type Name Description
TimeSpan ts
Returns
Type Description
bool

True if the timespan is zero

RelativeTimePhrase(DateTime)

Helper class for TimeConverter.

Declaration
public static string RelativeTimePhrase(DateTime dt)
Parameters
Type Name Description
DateTime dt
Returns
Type Description
string
© SuperOffice. All rights reserved.
SuperOffice |  Community |  Release Notes |  Privacy |  Site feedback |  Search Docs |  About Docs |  Contribute |  Back to top