C# Class System.DateTimeExtensions

Mostrar archivo Open project: TargetProcess/Target-Process-Plugins

Public Properties

Property Type Description
MaxDateValue DateTime
MinDateValue DateTime

Private Properties

Property Type Description
Date DateTime?
DateDiffInSeconds int
FloorMonth System.DateTime
FloorMonth DateTime?
FloorQuarter System.DateTime
FloorQuarter DateTime?
FloorWeek System.DateTime
FloorWeek DateTime?
FloorYear System.DateTime
FloorYear DateTime?
ForecastEndDate DateTime?
WeekNumber int

Public Methods

Method Description
AddDays ( this date, double days ) : DateTime?
Days ( this days ) : System.TimeSpan
GetDateName ( this date ) : string
GetPartWeekName ( this weekStartDate, System.DateTime weekEndDate ) : string
GetWeekFirstDay ( this date ) : System.DateTime
GetWeekLastDay ( this date ) : System.DateTime
GetWeekName ( this date ) : string
HumanFormat ( this dateTime ) : IFormattedMessage
Subtract ( this date, TimeSpan timeSpan ) : DateTime?
SubtractDays ( this dateTime, int days ) : DateTime
ToJavascriptDate ( this date ) : long
TrimHours ( this dateTime ) : DateTime
TrimMilliseconds ( this dateTime ) : DateTime
TrimMilliseconds ( this dateTime ) : DateTime?
Truncate ( this dateTime, TimeSpan timeSpan ) : DateTime

Private Methods

Method Description
Date ( this date ) : DateTime?
DateDiffInSeconds ( this date, System.DateTime otherDate ) : int
FloorMonth ( this date ) : System.DateTime
FloorMonth ( this date ) : DateTime?
FloorQuarter ( this date ) : System.DateTime
FloorQuarter ( this date ) : DateTime?
FloorWeek ( System.DateTime dateTime ) : System.DateTime
FloorWeek ( this date ) : DateTime?
FloorYear ( this date ) : System.DateTime
FloorYear ( this date ) : DateTime?
ForecastEndDate ( this startDate, System.DateTime now, decimal progress ) : DateTime?
WeekNumber ( this date ) : int

Method Details

AddDays() public static method

public static AddDays ( this date, double days ) : DateTime?
date this
days double
return DateTime?

Days() public static method

public static Days ( this days ) : System.TimeSpan
days this
return System.TimeSpan

GetDateName() public static method

public static GetDateName ( this date ) : string
date this
return string

GetPartWeekName() public static method

public static GetPartWeekName ( this weekStartDate, System.DateTime weekEndDate ) : string
weekStartDate this
weekEndDate System.DateTime
return string

GetWeekFirstDay() public static method

public static GetWeekFirstDay ( this date ) : System.DateTime
date this
return System.DateTime

GetWeekLastDay() public static method

public static GetWeekLastDay ( this date ) : System.DateTime
date this
return System.DateTime

GetWeekName() public static method

public static GetWeekName ( this date ) : string
date this
return string

HumanFormat() public static method

public static HumanFormat ( this dateTime ) : IFormattedMessage
dateTime this
return IFormattedMessage

Subtract() public static method

public static Subtract ( this date, TimeSpan timeSpan ) : DateTime?
date this
timeSpan TimeSpan
return DateTime?

SubtractDays() public static method

public static SubtractDays ( this dateTime, int days ) : DateTime
dateTime this
days int
return DateTime

ToJavascriptDate() public static method

public static ToJavascriptDate ( this date ) : long
date this
return long

TrimHours() public static method

public static TrimHours ( this dateTime ) : DateTime
dateTime this
return DateTime

TrimMilliseconds() public static method

public static TrimMilliseconds ( this dateTime ) : DateTime
dateTime this
return DateTime

TrimMilliseconds() public static method

public static TrimMilliseconds ( this dateTime ) : DateTime?
dateTime this
return DateTime?

Truncate() public static method

public static Truncate ( this dateTime, TimeSpan timeSpan ) : DateTime
dateTime this
timeSpan TimeSpan
return DateTime

Property Details

MaxDateValue public_oe static_oe property

public static DateTime MaxDateValue
return DateTime

MinDateValue public_oe static_oe property

public static DateTime MinDateValue
return DateTime