C# Class EqualityComparer.DateTimeExtensions

Date time extensions.
7/19/2011.
Datei anzeigen Open project: Iristyle/EqualityComparer

Public Methods

Method Description
RoundToNearestSecond ( this value ) : System.DateTime

A DateTime extension method that rounds DateTimes to the nearest second.

7/19/2011.

TruncateToSecond ( this value ) : System.DateTime

Truncates DateTime to second, so that JSON values with DateTimes can be roundtripped / compared properly.

7/19/2011.

Method Details

RoundToNearestSecond() public static method

A DateTime extension method that rounds DateTimes to the nearest second.
7/19/2011.
public static RoundToNearestSecond ( this value ) : System.DateTime
value this Original DateTime value.
return System.DateTime

TruncateToSecond() public static method

Truncates DateTime to second, so that JSON values with DateTimes can be roundtripped / compared properly.
7/19/2011.
public static TruncateToSecond ( this value ) : System.DateTime
value this Original DateTime value.
return System.DateTime