Class TimeConverterHelper
Inheritance
TimeConverterHelper
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
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
TimeBaseDb
Return the datetime value that is used in the database, to represent "lowest possible date"
Declaration
public static DateTime TimeBaseDb { get; }
Property Value
TimeBaseLocal
Return the lowest valid date, 1.1.1970. This DateTime has Kind = Local
Declaration
public static DateTime TimeBaseLocal { get; }
Property Value
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
Methods
CoerceMinDateToYearZero(object)
Declaration
public static object CoerceMinDateToYearZero(object maybeDateTime)
Parameters
Type |
Name |
Description |
object |
maybeDateTime |
|
Returns
IsYearZero(DateTime)
Declaration
public static bool IsYearZero(this DateTime dateTime)
Parameters
Returns
IsYearZeroOrMinValue(DateTime)
Checks if dateTime is YearZero or MinValue.
Declaration
public static bool IsYearZeroOrMinValue(this DateTime dateTime)
Parameters
Returns
IsZeroOrMinValue(TimeSpan)
Checks if dateTime is YearZero or MinValue.
Declaration
public static bool IsZeroOrMinValue(this TimeSpan ts)
Parameters
Returns
Type |
Description |
bool |
True if the timespan is zero
|
RelativeTimePhrase(DateTime)
Declaration
public static string RelativeTimePhrase(DateTime dt)
Parameters
Returns