C# Class FluentDateTimeOffset.TimeSpanOffsetExtensions

Static class containing Fluent TimeSpan extension methods.
Afficher le fichier Open project: FluentDateTime/FluentDateTime

Méthodes publiques

Méthode Description
Ago ( this from ) : DateTimeOffset

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

Ago ( this from, DateTimeOffset originalValue ) : DateTimeOffset

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

Before ( this from, DateTimeOffset originalValue ) : DateTimeOffset

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

From ( this from, DateTimeOffset originalValue ) : DateTimeOffset

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

FromNow ( this from ) : DateTimeOffset

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

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

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

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

ToDisplayString ( this timeSpan ) : string

Convert a TimeSpan to a human readable string.

Method Details

Ago() public static méthode

Subtracts given TimeSpan from current date (DateTime.Now) and returns resulting DateTime in the past.
public static Ago ( this from ) : DateTimeOffset
from this
Résultat DateTimeOffset

Ago() public static méthode

Subtracts given TimeSpan from originalValue DateTime and returns resulting DateTime in the past.
public static Ago ( this from, DateTimeOffset originalValue ) : DateTimeOffset
from this
originalValue DateTimeOffset
Résultat DateTimeOffset

Before() public static méthode

Subtracts given TimeSpan from originalValue DateTime and returns resulting DateTime in the past.
public static Before ( this from, DateTimeOffset originalValue ) : DateTimeOffset
from this
originalValue DateTimeOffset
Résultat DateTimeOffset

From() public static méthode

Adds given TimeSpan to supplied originalValue DateTime and returns resulting DateTime in the future.
public static From ( this from, DateTimeOffset originalValue ) : DateTimeOffset
from this
originalValue DateTimeOffset
Résultat DateTimeOffset

FromNow() public static méthode

Adds given TimeSpan to current DateTime.Now and returns resulting DateTime in the future.
public static FromNow ( this from ) : DateTimeOffset
from this
Résultat DateTimeOffset

Round() public static méthode

public static Round ( this timeSpan, RoundTo rt ) : System.TimeSpan
timeSpan this
rt RoundTo
Résultat System.TimeSpan

Since() public static méthode

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

ToDisplayString() public static méthode

Convert a TimeSpan to a human readable string.
public static ToDisplayString ( this timeSpan ) : string
timeSpan this The to convert
Résultat string