C# Класс PRI.ProductivityExtensions.TemporalExtensions.Temporalable

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

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

Метод Описание
Ago ( this source ) : System.DateTime

Creates a final DateTime source in the past 50.Seconds.Ago();

BeginningOfDay ( this date ) : System.DateTime

Gets a DateTime that represents the first millisecond of the day represented by date

Days ( this source ) : System.TimeSpan

Creates a TimeSpan spanning source days. var oneDay = 1.Days();

Double ( this source ) : System.TimeSpan

Doubles a TimeSpan

EndOfDay ( this date ) : System.DateTime

Gets a DateTime that represents the last millisecond of the day represented by date

From ( this source, System.DateTime origin ) : System.DateTime

Calculates a final date spanning source after origin // calculate date/time that it will be in one hour var finalDate = new TimeSpan(0, 1, 0, 0).From(DateTime.Now);

Hours ( this source ) : System.TimeSpan

Creates a TimeSpan spanning source hours. var oneHour = 1.Hours();

Milliseconds ( this source ) : System.TimeSpan

Creates a TimeSpan spanning source milliseconds. var fiftyMilliseconds = 50.Milliseconds();

Minutes ( this source ) : System.TimeSpan

Creates a TimeSpan spanning source minutes. var oneMinute = 1.Minutes();

RoundToHours ( this timeSpan ) : System.TimeSpan

Rounds a TimeSpan to the nearest hour

RoundToMinutes ( this timeSpan ) : System.TimeSpan

Rounds a TimeSpan to the nearest minute

RoundToSeconds ( this timeSpan ) : System.TimeSpan

Rounds a TimeSpan to the nearest second

Second ( this source ) : System.TimeSpan

Creates a TimeSpan spanning 1 second. var oneSecond = 1.Second();

Seconds ( this source ) : System.TimeSpan

Creates a TimeSpan spanning source seconds. var fiveSeconds = 5.Second();

Since ( this source, System.DateTime origin ) : System.DateTime

Calculates a final date spanning source after origin Alias to From

ToEnglishString ( this timeSpan ) : string

Creates an English string from a TimeSpan value

Приватные методы

Метод Описание
Million ( this value ) : int
Months ( this source ) : System.TimeSpan
Thousand ( this value ) : int
Years ( this source ) : System.TimeSpan

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

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

Creates a final DateTime source in the past 50.Seconds.Ago();
public static Ago ( this source ) : System.DateTime
source this
Результат System.DateTime

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

Gets a DateTime that represents the first millisecond of the day represented by date
public static BeginningOfDay ( this date ) : System.DateTime
date this
Результат System.DateTime

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

Creates a TimeSpan spanning source days. var oneDay = 1.Days();
public static Days ( this source ) : System.TimeSpan
source this
Результат System.TimeSpan

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

Doubles a TimeSpan
public static Double ( this source ) : System.TimeSpan
source this
Результат System.TimeSpan

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

Gets a DateTime that represents the last millisecond of the day represented by date
public static EndOfDay ( this date ) : System.DateTime
date this
Результат System.DateTime

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

Calculates a final date spanning source after origin // calculate date/time that it will be in one hour var finalDate = new TimeSpan(0, 1, 0, 0).From(DateTime.Now);
public static From ( this source, System.DateTime origin ) : System.DateTime
source this
origin System.DateTime
Результат System.DateTime

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

Creates a TimeSpan spanning source hours. var oneHour = 1.Hours();
public static Hours ( this source ) : System.TimeSpan
source this
Результат System.TimeSpan

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

Creates a TimeSpan spanning source milliseconds. var fiftyMilliseconds = 50.Milliseconds();
public static Milliseconds ( this source ) : System.TimeSpan
source this
Результат System.TimeSpan

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

Creates a TimeSpan spanning source minutes. var oneMinute = 1.Minutes();
public static Minutes ( this source ) : System.TimeSpan
source this
Результат System.TimeSpan

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

Rounds a TimeSpan to the nearest hour
public static RoundToHours ( this timeSpan ) : System.TimeSpan
timeSpan this
Результат System.TimeSpan

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

Rounds a TimeSpan to the nearest minute
public static RoundToMinutes ( this timeSpan ) : System.TimeSpan
timeSpan this
Результат System.TimeSpan

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

Rounds a TimeSpan to the nearest second
public static RoundToSeconds ( this timeSpan ) : System.TimeSpan
timeSpan this
Результат System.TimeSpan

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

Creates a TimeSpan spanning 1 second. var oneSecond = 1.Second();
public static Second ( this source ) : System.TimeSpan
source this
Результат System.TimeSpan

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

Creates a TimeSpan spanning source seconds. var fiveSeconds = 5.Second();
public static Seconds ( this source ) : System.TimeSpan
source this
Результат System.TimeSpan

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

Calculates a final date spanning source after origin Alias to From
public static Since ( this source, System.DateTime origin ) : System.DateTime
source this
origin System.DateTime
Результат System.DateTime

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

Creates an English string from a TimeSpan value
public static ToEnglishString ( this timeSpan ) : string
timeSpan this
Результат string