Table of Contents

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

DateTime

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

short

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

object

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

dateTime DateTime

The 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

dateTIme DateTime

The 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

value short

The short value

Returns

DateTimeOrShort

DateTimeOrShort instance with short value