C# Class System.TimeUtils

Afficher le fichier Open project: sapiens/cavemantools

Méthodes publiques

Méthode Description
EnumerateTo ( this start, System.DateTime end ) : IEnumerable
IsSameMonthAs ( this date, System.DateTime otherDate ) : bool

Checks if both dates are days of the same month and year

MeasureTime ( System.Action action ) : System.TimeSpan
Multiply ( this duration, double modifier ) : System.TimeSpan
Multiply ( this duration, float modifier ) : System.TimeSpan

Multiplies a time period by a number

ToDays ( this value ) : System.TimeSpan
ToFirstDay ( this date ) : System.DateTime
ToHuman ( this time ) : string

Outputs the 'human friendly' format (ex: 4 days ago). English only

ToLastDayOfMonth ( this dt ) : System.DateTime
ToMiliseconds ( this value ) : System.TimeSpan
ToSeconds ( this value ) : System.TimeSpan

Method Details

EnumerateTo() public static méthode

public static EnumerateTo ( this start, System.DateTime end ) : IEnumerable
start this
end System.DateTime
Résultat IEnumerable

IsSameMonthAs() public static méthode

Checks if both dates are days of the same month and year
public static IsSameMonthAs ( this date, System.DateTime otherDate ) : bool
date this
otherDate System.DateTime
Résultat bool

MeasureTime() public static méthode

public static MeasureTime ( System.Action action ) : System.TimeSpan
action System.Action
Résultat System.TimeSpan

Multiply() public static méthode

public static Multiply ( this duration, double modifier ) : System.TimeSpan
duration this
modifier double
Résultat System.TimeSpan

Multiply() public static méthode

Multiplies a time period by a number
public static Multiply ( this duration, float modifier ) : System.TimeSpan
duration this
modifier float
Résultat System.TimeSpan

ToDays() public static méthode

public static ToDays ( this value ) : System.TimeSpan
value this
Résultat System.TimeSpan

ToFirstDay() public static méthode

public static ToFirstDay ( this date ) : System.DateTime
date this
Résultat System.DateTime

ToHuman() public static méthode

Outputs the 'human friendly' format (ex: 4 days ago). English only
public static ToHuman ( this time ) : string
time this
Résultat string

ToLastDayOfMonth() public static méthode

public static ToLastDayOfMonth ( this dt ) : System.DateTime
dt this
Résultat System.DateTime

ToMiliseconds() public static méthode

public static ToMiliseconds ( this value ) : System.TimeSpan
value this
Résultat System.TimeSpan

ToSeconds() public static méthode

public static ToSeconds ( this value ) : System.TimeSpan
value this
Résultat System.TimeSpan