C# 클래스 FluentDateTime.TimeSpanExtensions

Static class containing Fluent DateTime extension methods.
파일 보기 프로젝트 열기: FluentDateTime/FluentDateTime

공개 메소드들

메소드 설명
Ago ( this from ) : System.DateTime

Subtracts given TimeSpan from current date (DateTime.Now) and returns resulting DateTime in the past.

Ago ( this from, System.DateTime originalValue ) : System.DateTime

Subtracts given TimeSpan from originalValue DateTime and returns resulting DateTime in the past.

Before ( this from, System.DateTime originalValue ) : System.DateTime

Subtracts given TimeSpan from originalValue DateTime and returns resulting DateTime in the past.

From ( this from, System.DateTime originalValue ) : System.DateTime

Adds given TimeSpan to supplied originalValue DateTime and returns resulting DateTime in the future.

FromNow ( this from ) : System.DateTime

Adds given TimeSpan to current DateTime.Now and returns resulting DateTime in the future.

Round ( this timeSpan, RoundTo rt ) : System.TimeSpan
Since ( this from, System.DateTime originalValue ) : System.DateTime

Adds given TimeSpan to supplied originalValue DateTime and returns resulting DateTime in the future.

Synonym of From(System.TimeSpan,System.DateTime) method.

ToDisplayString ( this timeSpan ) : string

Convert a TimeSpan to a human readable string.

메소드 상세

Ago() 공개 정적인 메소드

Subtracts given TimeSpan from current date (DateTime.Now) and returns resulting DateTime in the past.
public static Ago ( this from ) : System.DateTime
from this
리턴 System.DateTime

Ago() 공개 정적인 메소드

Subtracts given TimeSpan from originalValue DateTime and returns resulting DateTime in the past.
public static Ago ( this from, System.DateTime originalValue ) : System.DateTime
from this
originalValue System.DateTime
리턴 System.DateTime

Before() 공개 정적인 메소드

Subtracts given TimeSpan from originalValue DateTime and returns resulting DateTime in the past.
public static Before ( this from, System.DateTime originalValue ) : System.DateTime
from this
originalValue System.DateTime
리턴 System.DateTime

From() 공개 정적인 메소드

Adds given TimeSpan to supplied originalValue DateTime and returns resulting DateTime in the future.
public static From ( this from, System.DateTime originalValue ) : System.DateTime
from this
originalValue System.DateTime
리턴 System.DateTime

FromNow() 공개 정적인 메소드

Adds given TimeSpan to current DateTime.Now and returns resulting DateTime in the future.
public static FromNow ( this from ) : System.DateTime
from this
리턴 System.DateTime

Round() 공개 정적인 메소드

public static Round ( this timeSpan, RoundTo rt ) : System.TimeSpan
timeSpan this
rt RoundTo
리턴 System.TimeSpan

Since() 공개 정적인 메소드

Adds given TimeSpan to supplied originalValue DateTime and returns resulting DateTime in the future.
Synonym of From(System.TimeSpan,System.DateTime) method.
public static Since ( this from, System.DateTime originalValue ) : System.DateTime
from this
originalValue System.DateTime
리턴 System.DateTime

ToDisplayString() 공개 정적인 메소드

Convert a TimeSpan to a human readable string.
public static ToDisplayString ( this timeSpan ) : string
timeSpan this The to convert
리턴 string