C# Класс FluentDateTime.TimeSpanExtensions

Static class containing Fluent DateTime extension methods.
Показать файл Открыть проект

Открытые методы

Метод Описание
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