HandCoded.Finance.Date.ToDateTime C# (CSharp) Method

ToDateTime() public method

Creates a DateTime instance representing midnight on the morning of the current date.
public ToDateTime ( ) : DateTime
return DateTime
        public DateTime ToDateTime()
        {
            return (new DateTime (dateValue, TimeValue.START_OF_DAY, timeZone));
        }

Usage Example

Exemplo n.º 1
0
 /// <summary>
 /// Returns the result of comparing this instance to another <b>Date</b>.
 /// </summary>
 /// <param name="other">The <b>Date</b> instance to compare with.</param>
 /// <returns>An integer value indicating the relative ordering.</returns>
 public int CompareTo(Date other)
 {
     if ((timeZone == null) && (other.timeZone == null))
     {
         return(dateValue.CompareTo(other.dateValue));
     }
     else if ((timeZone != null) && (other.timeZone != null) && timeZone.Equals(other.timeZone))
     {
         return(dateValue.CompareTo(other.dateValue));
     }
     else
     {
         return(ToDateTime().CompareTo(other.ToDateTime()));
     }
 }
All Usage Examples Of HandCoded.Finance.Date::ToDateTime