C# 클래스 PRI.ProductivityExtensions.TemporalExtensions.Temporalable

파일 보기 프로젝트 열기: peteraritchie/ProductivityExtensions

공개 메소드들

메소드 설명
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