C# Class SpeakFriend.Utilities.DateTimeExtensions

Mostrar archivo Open project: teamaton/speak-lib

Public Methods

Method Description
EndOfDay ( this dateTime ) : System.DateTime

Returns a new DateTime object with the same date part as the given dateTime but the time set to 23:59:59.999.

StartOfDay ( this dateTime ) : System.DateTime

Same as DateTime.Date. Returns a new DateTime object with the same date part as the given dateTime but the time set to 00:00:00.

ToMilliseconds ( this dateTime ) : long

Returns the number of milliseconds that elapsed from 01/01/1970 to the given dateTime.

Method Details

EndOfDay() public static method

Returns a new DateTime object with the same date part as the given dateTime but the time set to 23:59:59.999.
public static EndOfDay ( this dateTime ) : System.DateTime
dateTime this
return System.DateTime

StartOfDay() public static method

Same as DateTime.Date. Returns a new DateTime object with the same date part as the given dateTime but the time set to 00:00:00.
public static StartOfDay ( this dateTime ) : System.DateTime
dateTime this
return System.DateTime

ToMilliseconds() public static method

Returns the number of milliseconds that elapsed from 01/01/1970 to the given dateTime.
public static ToMilliseconds ( this dateTime ) : long
dateTime this
return long