C# Класс System.TimeUtils

Показать файл Открыть проект

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

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

Описание методов

EnumerateTo() публичный статический метод

public static EnumerateTo ( this start, System.DateTime end ) : IEnumerable
start this
end System.DateTime
Результат IEnumerable

IsSameMonthAs() публичный статический метод

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
Результат bool

MeasureTime() публичный статический метод

public static MeasureTime ( System.Action action ) : System.TimeSpan
action System.Action
Результат System.TimeSpan

Multiply() публичный статический метод

public static Multiply ( this duration, double modifier ) : System.TimeSpan
duration this
modifier double
Результат System.TimeSpan

Multiply() публичный статический метод

Multiplies a time period by a number
public static Multiply ( this duration, float modifier ) : System.TimeSpan
duration this
modifier float
Результат System.TimeSpan

ToDays() публичный статический метод

public static ToDays ( this value ) : System.TimeSpan
value this
Результат System.TimeSpan

ToFirstDay() публичный статический метод

public static ToFirstDay ( this date ) : System.DateTime
date this
Результат System.DateTime

ToHuman() публичный статический метод

Outputs the 'human friendly' format (ex: 4 days ago). English only
public static ToHuman ( this time ) : string
time this
Результат string

ToLastDayOfMonth() публичный статический метод

public static ToLastDayOfMonth ( this dt ) : System.DateTime
dt this
Результат System.DateTime

ToMiliseconds() публичный статический метод

public static ToMiliseconds ( this value ) : System.TimeSpan
value this
Результат System.TimeSpan

ToSeconds() публичный статический метод

public static ToSeconds ( this value ) : System.TimeSpan
value this
Результат System.TimeSpan