Class SDateTime
- Namespace
- SWConfigDataClientLib.Proxies.ComplexDataTypes
- Assembly
- IpPbxCDSClientLib.dll
__gc container for __var type System.DateTime
public class SDateTime : SComplexBase
- Inheritance
-
SDateTime
- Inherited Members
Constructors
SDateTime()
Constructor. The object will not be valid because of having no value.
public SDateTime()
SDateTime(DateTime)
See DateTime
public SDateTime(DateTime dateTime)
Parameters
dateTime
DateTime
SDateTime(int, int, int)
Contructor
public SDateTime(int year, int month, int day)
Parameters
SDateTime(int, int, int, bool)
Contructor
public SDateTime(int year, int month, int day, bool isUTC)
Parameters
SDateTime(int, int, int, int, int, int, int)
Contructor
public SDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond)
Parameters
year
intyear
month
intmonth
day
intday
hour
inthour
minute
intminute
second
intsecond
millisecond
intmillisecond
SDateTime(int, int, int, int, int, int, int, bool)
Contructor
public SDateTime(int year, int month, int day, int hour, int minute, int second, int millisecond, bool isUTC)
Parameters
year
intyear
month
intmonth
day
intday
hour
inthour
minute
intminute
second
intsecond
millisecond
intmillisecond
isUTC
booltrue if date time is UTC
SDateTime(long)
See DateTime
public SDateTime(long fileTime)
Parameters
fileTime
long
SDateTime(string)
Contructor
public SDateTime(string dateString)
Parameters
dateString
stringDate in string representation
Fields
dateTime
containing DateTime
protected DateTime dateTime
Field Value
Properties
DateTime
See DateTime
public DateTime DateTime { get; }
Property Value
Day
Day of DateTime
public int Day { get; }
Property Value
Hour
Hour of DateTime
public int Hour { get; }
Property Value
Millisecond
Millisecond of DateTime
public int Millisecond { get; }
Property Value
Minute
Minute of DateTime
public int Minute { get; }
Property Value
Month
Month of DateTime
public int Month { get; }
Property Value
Now
Returns a System.DateTime with current local time.
public static SDateTime Now { get; }
Property Value
NowUTC
Returns a System.DateTime with current local time.
public static SDateTime NowUTC { get; }
Property Value
Second
Second of DateTime
public int Second { get; }
Property Value
Today
Returns a System.DateTime with current day 0:00.
public static SDateTime Today { get; }
Property Value
Year
Year of DateTime
public int Year { get; }
Property Value
Methods
Add(STimeSpan)
Adds the value of the specified System.TimeSpan to the value of this instance.
public SDateTime Add(STimeSpan value)
Parameters
value
STimeSpanA System.TimeSpan that contains the interval to add.
Returns
- SDateTime
A System.DateTime whose value is the sum of the date and time represented by this instance and the time interval represented by value.
Exceptions
- ArgumentOutOfRangeException
The resulting System.DateTime is less than System.DateTime.MinValue or greater than System.DateTime.MaxValue.
AsString(string)
Converts the value of this instance to its equivalent short time string representation.
public string AsString(string format)
Parameters
format
string
Returns
- string
A string containing hours, minutes, and seconds equivalent to the time value of this instance.
CompareTo(SDateTime)
public int CompareTo(SDateTime dateTime)
Parameters
dateTime
SDateTime
Returns
FromFileTime(long)
Returns a System.DateTime equivalent to the specified operating system file timestamp.
public static SDateTime FromFileTime(long fileTime)
Parameters
fileTime
longA Windows file time.
Returns
- SDateTime
A System.DateTime value representing the date and time of fileTime, adjusted to local time.
FromFileTimeUtc(long)
public static SDateTime FromFileTimeUtc(long fileTime)
Parameters
fileTime
long
Returns
IsInTimeFrame(SDateTime, SDateTime)
Returns a System.DateTime with current local time.
public bool IsInTimeFrame(SDateTime start, SDateTime end)
Parameters
Returns
IsKindLocal()
Return true if the kind in local.
public bool IsKindLocal()
Returns
- bool
Return true if the kind in local.
IsKindUnspecified()
Return true if the kind in unspecified.
public bool IsKindUnspecified()
Returns
- bool
Return true if the kind in unspecified.
IsKindUtc()
Return true if the kind in utc.
public bool IsKindUtc()
Returns
- bool
Return true if the kind in utc.
MaxValue()
Returns a SDateTime with maximum value
public static SDateTime MaxValue()
Returns
- SDateTime
SDateTime.
MinValue()
Returns a SDateTime with minimum value
public static SDateTime MinValue()
Returns
- SDateTime
SDateTime.
Subtract(STimeSpan)
Subtracts the specified duration from this instance.
public SDateTime Subtract(STimeSpan value)
Parameters
value
STimeSpanAn instance of CTimeSpan
Returns
- SDateTime
A System.DateTime equal to the date and time represented by this instance minus the time interval represented by value.
ToFileTime()
Converts the value of this instance to the format of a local operating system file time
public long ToFileTime()
Returns
- long
The value of this System.DateTime in the format of a local operating system file time.
ToFileTimeUtc()
Converts the value of this instance to the format of operating system file time, ignoring the local time zone.
public long ToFileTimeUtc()
Returns
- long
The value of this System.DateTime in the format of an operating system file time. The file time is not offset to account for the local time zone.
ToLocalTime()
Converts the value of the current System.DateTime object to local time.
public SDateTime ToLocalTime()
Returns
ToLongTimeString()
Converts the value of this instance to its equivalent short time string representation.
public string ToLongTimeString()
Returns
- string
A string containing hours, minutes, and seconds equivalent to the time value of this instance.
ToShortDateString()
Converts the value of this instance to its equivalent short date string representation.
public string ToShortDateString()
Returns
- string
A string containing the numeric month, the numeric day of the month, and the year equivalent to the date value of this instance.
ToShortTimeString()
Converts the value of this instance to its equivalent short time string representation.
public string ToShortTimeString()
Returns
- string
A string containing hours and minutes equivalent to the time value of this instance.
ToString()
Return DateTime in string representation.
public override string ToString()
Returns
ToUniversalTime()
Converts the value of the current System.DateTime object to Coordinated Universal Time (UTC).
public SDateTime ToUniversalTime()