C# Class CoreTechs.Common.DateTimeExtensions

ファイルを表示 Open project: Core-Techs/Common

Public Methods

Method Description
Abs ( this timeSpan ) : System.TimeSpan
Divide ( this timeSpan, double n ) : System.TimeSpan
Multiply ( this timeSpan, int n ) : System.TimeSpan
SetDay ( this dt, int day ) : System.DateTime
SetDay ( this dt, int day ) : DateTimeOffset
SetHour ( this dt, int hour ) : System.DateTime
SetHour ( this dt, int hour ) : DateTimeOffset
SetMillisecond ( this dt, int millisecond ) : System.DateTime
SetMillisecond ( this dt, int millisecond ) : DateTimeOffset
SetMinute ( this dt, int minute ) : System.DateTime
SetMinute ( this dt, int minute ) : DateTimeOffset
SetMonth ( this dt, int month ) : System.DateTime
SetMonth ( this dt, int month ) : DateTimeOffset
SetSecond ( this dt, int second ) : System.DateTime
SetSecond ( this dt, int second ) : DateTimeOffset
SetYear ( this dt, int year ) : System.DateTime
SetYear ( this dt, int year ) : DateTimeOffset
Sleep ( this timeSpan ) : void
SpecifyKind ( this dt, DateTimeKind kind ) : DateTime
ToDateTimeOffset ( this dt ) : DateTimeOffset
TotalMonths ( this timeSpan ) : double
TotalYears ( this timeSpan ) : double
Truncate ( this dt, DateTimePrecision precision = DateTimePrecision.Millisecond ) : DateTime
Truncate ( this dt, DateTimePrecision precision = DateTimePrecision.Millisecond ) : DateTimeOffset

Method Details

Abs() public static method

public static Abs ( this timeSpan ) : System.TimeSpan
timeSpan this
return System.TimeSpan

Divide() public static method

public static Divide ( this timeSpan, double n ) : System.TimeSpan
timeSpan this
n double
return System.TimeSpan

Multiply() public static method

public static Multiply ( this timeSpan, int n ) : System.TimeSpan
timeSpan this
n int
return System.TimeSpan

SetDay() public static method

public static SetDay ( this dt, int day ) : System.DateTime
dt this
day int
return System.DateTime

SetDay() public static method

public static SetDay ( this dt, int day ) : DateTimeOffset
dt this
day int
return DateTimeOffset

SetHour() public static method

public static SetHour ( this dt, int hour ) : System.DateTime
dt this
hour int
return System.DateTime

SetHour() public static method

public static SetHour ( this dt, int hour ) : DateTimeOffset
dt this
hour int
return DateTimeOffset

SetMillisecond() public static method

public static SetMillisecond ( this dt, int millisecond ) : System.DateTime
dt this
millisecond int
return System.DateTime

SetMillisecond() public static method

public static SetMillisecond ( this dt, int millisecond ) : DateTimeOffset
dt this
millisecond int
return DateTimeOffset

SetMinute() public static method

public static SetMinute ( this dt, int minute ) : System.DateTime
dt this
minute int
return System.DateTime

SetMinute() public static method

public static SetMinute ( this dt, int minute ) : DateTimeOffset
dt this
minute int
return DateTimeOffset

SetMonth() public static method

public static SetMonth ( this dt, int month ) : System.DateTime
dt this
month int
return System.DateTime

SetMonth() public static method

public static SetMonth ( this dt, int month ) : DateTimeOffset
dt this
month int
return DateTimeOffset

SetSecond() public static method

public static SetSecond ( this dt, int second ) : System.DateTime
dt this
second int
return System.DateTime

SetSecond() public static method

public static SetSecond ( this dt, int second ) : DateTimeOffset
dt this
second int
return DateTimeOffset

SetYear() public static method

public static SetYear ( this dt, int year ) : System.DateTime
dt this
year int
return System.DateTime

SetYear() public static method

public static SetYear ( this dt, int year ) : DateTimeOffset
dt this
year int
return DateTimeOffset

Sleep() public static method

public static Sleep ( this timeSpan ) : void
timeSpan this
return void

SpecifyKind() public static method

public static SpecifyKind ( this dt, DateTimeKind kind ) : DateTime
dt this
kind DateTimeKind
return DateTime

ToDateTimeOffset() public static method

public static ToDateTimeOffset ( this dt ) : DateTimeOffset
dt this
return DateTimeOffset

TotalMonths() public static method

public static TotalMonths ( this timeSpan ) : double
timeSpan this
return double

TotalYears() public static method

public static TotalYears ( this timeSpan ) : double
timeSpan this
return double

Truncate() public static method

public static Truncate ( this dt, DateTimePrecision precision = DateTimePrecision.Millisecond ) : DateTime
dt this
precision DateTimePrecision
return DateTime

Truncate() public static method

public static Truncate ( this dt, DateTimePrecision precision = DateTimePrecision.Millisecond ) : DateTimeOffset
dt this
precision DateTimePrecision
return DateTimeOffset