Class DateTimeOrShort
- Namespace
- SunamoDateTime.Data
- Assembly
- SunamoDateTime.dll
Represents a value that can be either a short or a DateTime. EN: Union type for storing either short or DateTime values. CZ: Union typ pro ukládání buď short nebo DateTime hodnot.
public class DateTimeOrShort
- Inheritance
-
DateTimeOrShort
- Inherited Members
- Extension Methods
Properties
DateTimeValue
Gets or sets the DateTime value when UseDateTime is true. EN: Stores the DateTime representation of the value. CZ: Ukládá DateTime reprezentaci hodnoty.
public DateTime DateTimeValue { get; set; }
Property Value
ShortValue
Gets or sets the short value when UseDateTime is false. EN: Stores the short representation of the value. CZ: Ukládá short reprezentaci hodnoty.
public short ShortValue { get; set; }
Property Value
Value
Gets the value as either short or DateTime based on the current mode. EN: Returns ShortValue if UseDateTime is false, otherwise returns DateTimeValue. CZ: Vrací ShortValue pokud je UseDateTime false, jinak vrací DateTimeValue.
public object Value { get; }
Property Value
Methods
FromDateTime(DateTime)
Creates a DateTimeOrShort from a DateTime value. EN: Initializes with DateTime value mode. CZ: Inicializuje v režimu DateTime hodnoty.
public static DateTimeOrShort FromDateTime(DateTime dateTime)
Parameters
dateTimeDateTimeThe DateTime value
Returns
- DateTimeOrShort
DateTimeOrShort instance with DateTime value
FromShort(DateTime)
Creates a DateTimeOrShort from a DateTime value by converting it to short. EN: Converts DateTime to short using NormalizeDate.To. CZ: Převede DateTime na short pomocí NormalizeDate.To.
public static DateTimeOrShort FromShort(DateTime dateTIme)
Parameters
dateTImeDateTimeThe DateTime value to convert
Returns
- DateTimeOrShort
DateTimeOrShort instance with short value
FromShort(short)
Creates a DateTimeOrShort from a short value. EN: Initializes with short value mode. CZ: Inicializuje v režimu short hodnoty.
public static DateTimeOrShort FromShort(short value)
Parameters
valueshortThe short value
Returns
- DateTimeOrShort
DateTimeOrShort instance with short value