Method | Description | |
---|---|---|
AddBusinessDays ( this current, int days ) : DateTimeOffset |
Adds the given number of business days to the DateTimeOffset.
|
|
At ( this current, int hour, int minute ) : DateTimeOffset |
Returns the given DateTimeOffset with hour and minutes set At given values.
|
|
At ( this current, int hour, int minute, int second ) : DateTimeOffset |
Returns the given DateTimeOffset with hour and minutes and seconds set At given values.
|
|
At ( this current, int hour, int minute, int second, int milliseconds ) : DateTimeOffset |
Returns the given DateTimeOffset with hour and minutes and seconds and milliseconds set At given values.
|
|
BeginningOfDay ( this date ) : DateTimeOffset |
Returns the Start of the given day (the first millisecond of the given DateTimeOffset).
|
|
DecreaseTime ( this startDate, System.TimeSpan toSubtract ) : DateTimeOffset |
Decreases the DateTimeOffset object with given TimeSpan value.
|
|
EndOfDay ( this date ) : DateTimeOffset |
Returns the very end of the given day (the last millisecond of the last hour for the given DateTimeOffset).
|
|
FirstDayOfMonth ( this current ) : DateTimeOffset |
Sets the day of the DateTimeOffset to the first day in that month.
|
|
FirstDayOfQuarter ( this current ) : DateTimeOffset |
Sets the day of the DateTimeOffset to the first day in that calendar quarter. credit to http://www.devcurry.com/2009/05/find-first-and-last-day-of-current.html
|
|
FirstDayOfWeek ( this dateTime ) : DateTimeOffset |
Returns a DateTimeOffset adjusted to the beginning of the week. the beginning of the week is controlled by the current Culture |
|
FirstDayOfYear ( this current ) : DateTimeOffset |
Returns the first day of the year keeping the time component intact. Eg, 2011-02-04T06:40:20.005 => 2011-01-01T06:40:20.005
|
|
IncreaseTime ( this startDate, System.TimeSpan toAdd ) : DateTimeOffset |
Increases the DateTimeOffset object with given TimeSpan value.
|
|
IsAfter ( this current, DateTimeOffset toCompareWith ) : bool |
Determines whether the specified DateTimeOffset value is After then current value.
|
|
IsBefore ( this current, DateTimeOffset toCompareWith ) : bool |
Determines whether the specified DateTimeOffset is before then current value.
|
|
IsInFuture ( this dateTime ) : bool |
Determine if a DateTimeOffset is in the future.
|
|
IsInPast ( this dateTime ) : bool |
Determine if a DateTimeOffset is in the past.
|
|
LastDayOfMonth ( this current ) : DateTimeOffset |
Sets the day of the DateTimeOffset to the last day in that month.
|
|
LastDayOfQuarter ( this current ) : DateTimeOffset |
Sets the day of the DateTimeOffset to the last day in that calendar quarter. credit to http://www.devcurry.com/2009/05/find-first-and-last-day-of-current.html
|
|
LastDayOfWeek ( this current ) : DateTimeOffset |
Returns the last day of the week keeping the time component intact. Eg, 2011-12-24T06:40:20.005 => 2011-12-25T06:40:20.005
|
|
LastDayOfYear ( this current ) : DateTimeOffset |
Returns the last day of the year keeping the time component intact. Eg, 2011-12-24T06:40:20.005 => 2011-12-31T06:40:20.005
|
|
Midnight ( this value ) : DateTimeOffset |
Returns original DateTimeOffset value with time part set to midnight (alias for BeginningOfDay method).
|
|
Next ( this start, DayOfWeek day ) : DateTimeOffset |
Returns first next occurrence of specified DayOfWeek.
|
|
NextDay ( this start ) : DateTimeOffset |
Returns DateTimeOffset increased by 24 hours ie Next Day.
|
|
NextMonth ( this current ) : DateTimeOffset |
Returns the next month keeping the time component intact. Eg, 2012-12-05T06:40:20.005 => 2013-01-05T06:40:20.005 If the next month doesn't have that many days the last day of the next month is used. Eg, 2013-01-31T06:40:20.005 => 2013-02-28T06:40:20.005
|
|
NextYear ( this start ) : DateTimeOffset |
Returns the same date (same Day, Month, Hour, Minute, Second etc) in the next calendar year. If that day does not exist in next year in same month, number of missing days is added to the last day in same month next year.
|
|
Noon ( this value ) : DateTimeOffset |
Returns original DateTimeOffset value with time part set to Noon (12:00:00h).
|
|
Previous ( this start, DayOfWeek day ) : DateTimeOffset |
Returns first next occurrence of specified DayOfWeek.
|
|
PreviousDay ( this start ) : DateTimeOffset |
Returns DateTimeOffset decreased by 24h period ie Previous Day.
|
|
PreviousMonth ( this current ) : DateTimeOffset |
Returns the previous month keeping the time component intact. Eg, 2010-01-20T06:40:20.005 => 2009-12-20T06:40:20.005 If the previous month doesn't have that many days the last day of the previous month is used. Eg, 2009-03-31T06:40:20.005 => 2009-02-28T06:40:20.005
|
|
PreviousYear ( this start ) : DateTimeOffset |
Returns the same date (same Day, Month, Hour, Minute, Second etc) in the previous calendar year. If that day does not exist in previous year in same month, number of missing days is added to the last day in same month previous year.
|
|
Round ( this dateTime, RoundTo rt ) : DateTimeOffset | ||
SameDay ( this current, DateTimeOffset date ) : bool |
Determines whether the specified DateTimeOffset value is exactly the same day (day + month + year) then current
|
|
SameMonth ( this current, DateTimeOffset date ) : bool |
Determines whether the specified DateTimeOffset value is exactly the same month (month + year) then current. Eg, 2015-12-01 and 2014-12-01 => False
|
|
SameYear ( this current, DateTimeOffset date ) : bool |
Determines whether the specified DateTimeOffset value is exactly the same year then current. Eg, 2015-12-01 and 2015-01-01 => True
|
|
SetDate ( this value, int year ) : DateTimeOffset |
Returns DateTimeOffset with changed Year part.
|
|
SetDate ( this value, int year, int month ) : DateTimeOffset |
Returns DateTimeOffset with changed Year and Month part.
|
|
SetDate ( this value, int year, int month, int day ) : DateTimeOffset |
Returns DateTimeOffset with changed Year, Month and Day part.
|
|
SetDay ( this value, int day ) : DateTimeOffset |
Returns DateTimeOffset with changed Day part.
|
|
SetHour ( this originalDate, int hour ) : DateTimeOffset |
Returns DateTimeOffset with changed Hour part.
|
|
SetMillisecond ( this originalDate, int millisecond ) : DateTimeOffset |
Returns DateTimeOffset with changed Millisecond part.
|
|
SetMinute ( this originalDate, int minute ) : DateTimeOffset |
Returns DateTimeOffset with changed Minute part.
|
|
SetMonth ( this value, int month ) : DateTimeOffset |
Returns DateTimeOffset with changed Month part.
|
|
SetSecond ( this originalDate, int second ) : DateTimeOffset |
Returns DateTimeOffset with changed Second part.
|
|
SetTime ( this originalDate, int hour ) : DateTimeOffset |
Returns the original DateTimeOffset with Hour part changed to supplied hour parameter.
|
|
SetTime ( this originalDate, int hour, int minute ) : DateTimeOffset |
Returns the original DateTimeOffset with Hour and Minute parts changed to supplied hour and minute parameters.
|
|
SetTime ( this originalDate, int hour, int minute, int second ) : DateTimeOffset |
Returns the original DateTimeOffset with Hour, Minute and Second parts changed to supplied hour, minute and second parameters.
|
|
SetTime ( this originalDate, int hour, int minute, int second, int millisecond ) : DateTimeOffset |
Returns the original DateTimeOffset with Hour, Minute, Second and Millisecond parts changed to supplied hour, minute, second and millisecond parameters.
|
|
SetYear ( this value, int year ) : DateTimeOffset |
Returns DateTimeOffset with changed Year part.
|
|
SubtractBusinessDays ( this current, int days ) : DateTimeOffset |
Subtracts the given number of business days to the DateTimeOffset.
|
|
WeekAfter ( this start ) : DateTimeOffset |
Increases supplied DateTimeOffset for 7 days ie returns the Next Week.
|
|
WeekEarlier ( this start ) : DateTimeOffset |
Decreases supplied DateTimeOffset for 7 days ie returns the Previous Week.
|
Method | Description | |
---|---|---|
StartOfWeek ( this dateTime ) : DateTimeOffset |
public static AddBusinessDays ( this current, int days ) : DateTimeOffset | ||
current | this | The date to be changed. |
days | int | Number of business days to be added. |
return | DateTimeOffset |
public static At ( this current, int hour, int minute ) : DateTimeOffset | ||
current | this | The current |
hour | int | The hour to set time to. |
minute | int | The minute to set time to. |
return | DateTimeOffset |
public static At ( this current, int hour, int minute, int second ) : DateTimeOffset | ||
current | this | The current |
hour | int | The hour to set time to. |
minute | int | The minute to set time to. |
second | int | The second to set time to. |
return | DateTimeOffset |
public static At ( this current, int hour, int minute, int second, int milliseconds ) : DateTimeOffset | ||
current | this | The current |
hour | int | The hour to set time to. |
minute | int | The minute to set time to. |
second | int | The second to set time to. |
milliseconds | int | The milliseconds to set time to. |
return | DateTimeOffset |
public static BeginningOfDay ( this date ) : DateTimeOffset | ||
date | this | |
return | DateTimeOffset |
public static DecreaseTime ( this startDate, System.TimeSpan toSubtract ) : DateTimeOffset | ||
startDate | this | |
toSubtract | System.TimeSpan | |
return | DateTimeOffset |
public static EndOfDay ( this date ) : DateTimeOffset | ||
date | this | |
return | DateTimeOffset |
public static FirstDayOfMonth ( this current ) : DateTimeOffset | ||
current | this | The current |
return | DateTimeOffset |
public static FirstDayOfQuarter ( this current ) : DateTimeOffset | ||
current | this | |
return | DateTimeOffset |
public static FirstDayOfWeek ( this dateTime ) : DateTimeOffset | ||
dateTime | this | The DateTimeOffset to adjust |
return | DateTimeOffset |
public static FirstDayOfYear ( this current ) : DateTimeOffset | ||
current | this | The DateTimeOffset to adjust |
return | DateTimeOffset |
public static IncreaseTime ( this startDate, System.TimeSpan toAdd ) : DateTimeOffset | ||
startDate | this | |
toAdd | System.TimeSpan | |
return | DateTimeOffset |
public static IsAfter ( this current, DateTimeOffset toCompareWith ) : bool | ||
current | this | The current value. |
toCompareWith | DateTimeOffset | Value to compare with. |
return | bool |
public static IsBefore ( this current, DateTimeOffset toCompareWith ) : bool | ||
current | this | The current value. |
toCompareWith | DateTimeOffset | Value to compare with. |
return | bool |
public static IsInFuture ( this dateTime ) : bool | ||
dateTime | this | The date to be checked. |
return | bool |
public static IsInPast ( this dateTime ) : bool | ||
dateTime | this | The date to be checked. |
return | bool |
public static LastDayOfMonth ( this current ) : DateTimeOffset | ||
current | this | The current DateTimeOffset to be changed. |
return | DateTimeOffset |
public static LastDayOfQuarter ( this current ) : DateTimeOffset | ||
current | this | |
return | DateTimeOffset |
public static LastDayOfWeek ( this current ) : DateTimeOffset | ||
current | this | The DateTimeOffset to adjust |
return | DateTimeOffset |
public static LastDayOfYear ( this current ) : DateTimeOffset | ||
current | this | The DateTimeOffset to adjust |
return | DateTimeOffset |
public static Midnight ( this value ) : DateTimeOffset | ||
value | this | |
return | DateTimeOffset |
public static Next ( this start, DayOfWeek day ) : DateTimeOffset | ||
start | this | |
day | DayOfWeek | |
return | DateTimeOffset |
public static NextDay ( this start ) : DateTimeOffset | ||
start | this | |
return | DateTimeOffset |
public static NextMonth ( this current ) : DateTimeOffset | ||
current | this | The DateTimeOffset to adjust |
return | DateTimeOffset |
public static NextYear ( this start ) : DateTimeOffset | ||
start | this | |
return | DateTimeOffset |
public static Noon ( this value ) : DateTimeOffset | ||
value | this | The |
return | DateTimeOffset |
public static Previous ( this start, DayOfWeek day ) : DateTimeOffset | ||
start | this | |
day | DayOfWeek | |
return | DateTimeOffset |
public static PreviousDay ( this start ) : DateTimeOffset | ||
start | this | |
return | DateTimeOffset |
public static PreviousMonth ( this current ) : DateTimeOffset | ||
current | this | The DateTimeOffset to adjust |
return | DateTimeOffset |
public static PreviousYear ( this start ) : DateTimeOffset | ||
start | this | |
return | DateTimeOffset |
public static Round ( this dateTime, RoundTo rt ) : DateTimeOffset | ||
dateTime | this | |
rt | RoundTo | |
return | DateTimeOffset |
public static SameDay ( this current, DateTimeOffset date ) : bool | ||
current | this | The current value |
date | DateTimeOffset | Value to compare with |
return | bool |
public static SameMonth ( this current, DateTimeOffset date ) : bool | ||
current | this | The current value |
date | DateTimeOffset | Value to compare with |
return | bool |
public static SameYear ( this current, DateTimeOffset date ) : bool | ||
current | this | The current value |
date | DateTimeOffset | Value to compare with |
return | bool |
public static SetDate ( this value, int year ) : DateTimeOffset | ||
value | this | |
year | int | |
return | DateTimeOffset |
public static SetDate ( this value, int year, int month ) : DateTimeOffset | ||
value | this | |
year | int | |
month | int | |
return | DateTimeOffset |
public static SetDate ( this value, int year, int month, int day ) : DateTimeOffset | ||
value | this | |
year | int | |
month | int | |
day | int | |
return | DateTimeOffset |
public static SetDay ( this value, int day ) : DateTimeOffset | ||
value | this | |
day | int | |
return | DateTimeOffset |
public static SetHour ( this originalDate, int hour ) : DateTimeOffset | ||
originalDate | this | |
hour | int | |
return | DateTimeOffset |
public static SetMillisecond ( this originalDate, int millisecond ) : DateTimeOffset | ||
originalDate | this | |
millisecond | int | |
return | DateTimeOffset |
public static SetMinute ( this originalDate, int minute ) : DateTimeOffset | ||
originalDate | this | |
minute | int | |
return | DateTimeOffset |
public static SetMonth ( this value, int month ) : DateTimeOffset | ||
value | this | |
month | int | |
return | DateTimeOffset |
public static SetSecond ( this originalDate, int second ) : DateTimeOffset | ||
originalDate | this | |
second | int | |
return | DateTimeOffset |
public static SetTime ( this originalDate, int hour ) : DateTimeOffset | ||
originalDate | this | |
hour | int | |
return | DateTimeOffset |
public static SetTime ( this originalDate, int hour, int minute ) : DateTimeOffset | ||
originalDate | this | |
hour | int | |
minute | int | |
return | DateTimeOffset |
public static SetTime ( this originalDate, int hour, int minute, int second ) : DateTimeOffset | ||
originalDate | this | |
hour | int | |
minute | int | |
second | int | |
return | DateTimeOffset |
public static SetTime ( this originalDate, int hour, int minute, int second, int millisecond ) : DateTimeOffset | ||
originalDate | this | |
hour | int | |
minute | int | |
second | int | |
millisecond | int | |
return | DateTimeOffset |
public static SetYear ( this value, int year ) : DateTimeOffset | ||
value | this | |
year | int | |
return | DateTimeOffset |
public static SubtractBusinessDays ( this current, int days ) : DateTimeOffset | ||
current | this | The date to be changed. |
days | int | Number of business days to be subtracted. |
return | DateTimeOffset |
public static WeekAfter ( this start ) : DateTimeOffset | ||
start | this | |
return | DateTimeOffset |
public static WeekEarlier ( this start ) : DateTimeOffset | ||
start | this | |
return | DateTimeOffset |