C# 클래스 FluentDateTimeOffset.DateTimeOffsetExtensions

Static class containing Fluent DateTimeOffset extension methods.
파일 보기 프로젝트 열기: FluentDateTime/FluentDateTime

공개 메소드들

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

비공개 메소드들

메소드 설명
StartOfWeek ( this dateTime ) : DateTimeOffset

메소드 상세

AddBusinessDays() 공개 정적인 메소드

Adds the given number of business days to the 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.
리턴 DateTimeOffset

At() 공개 정적인 메소드

Returns the given DateTimeOffset with hour and minutes set At given values.
public static At ( this current, int hour, int minute ) : DateTimeOffset
current this The current to be changed.
hour int The hour to set time to.
minute int The minute to set time to.
리턴 DateTimeOffset

At() 공개 정적인 메소드

Returns the given DateTimeOffset with hour and minutes and seconds set At given values.
public static At ( this current, int hour, int minute, int second ) : DateTimeOffset
current this The current to be changed.
hour int The hour to set time to.
minute int The minute to set time to.
second int The second to set time to.
리턴 DateTimeOffset

At() 공개 정적인 메소드

Returns the given DateTimeOffset with hour and minutes and seconds and milliseconds set At given values.
public static At ( this current, int hour, int minute, int second, int milliseconds ) : DateTimeOffset
current this The current to be changed.
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.
리턴 DateTimeOffset

BeginningOfDay() 공개 정적인 메소드

Returns the Start of the given day (the first millisecond of the given DateTimeOffset).
public static BeginningOfDay ( this date ) : DateTimeOffset
date this
리턴 DateTimeOffset

DecreaseTime() 공개 정적인 메소드

Decreases the DateTimeOffset object with given TimeSpan value.
public static DecreaseTime ( this startDate, System.TimeSpan toSubtract ) : DateTimeOffset
startDate this
toSubtract System.TimeSpan
리턴 DateTimeOffset

EndOfDay() 공개 정적인 메소드

Returns the very end of the given day (the last millisecond of the last hour for the given DateTimeOffset).
public static EndOfDay ( this date ) : DateTimeOffset
date this
리턴 DateTimeOffset

FirstDayOfMonth() 공개 정적인 메소드

Sets the day of the DateTimeOffset to the first day in that month.
public static FirstDayOfMonth ( this current ) : DateTimeOffset
current this The current to be changed.
리턴 DateTimeOffset

FirstDayOfQuarter() 공개 정적인 메소드

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
public static FirstDayOfQuarter ( this current ) : DateTimeOffset
current this
리턴 DateTimeOffset

FirstDayOfWeek() 공개 정적인 메소드

Returns a DateTimeOffset adjusted to the beginning of the week.
the beginning of the week is controlled by the current Culture
public static FirstDayOfWeek ( this dateTime ) : DateTimeOffset
dateTime this The DateTimeOffset to adjust
리턴 DateTimeOffset

FirstDayOfYear() 공개 정적인 메소드

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
public static FirstDayOfYear ( this current ) : DateTimeOffset
current this The DateTimeOffset to adjust
리턴 DateTimeOffset

IncreaseTime() 공개 정적인 메소드

Increases the DateTimeOffset object with given TimeSpan value.
public static IncreaseTime ( this startDate, System.TimeSpan toAdd ) : DateTimeOffset
startDate this
toAdd System.TimeSpan
리턴 DateTimeOffset

IsAfter() 공개 정적인 메소드

Determines whether the specified DateTimeOffset value is After then current value.
public static IsAfter ( this current, DateTimeOffset toCompareWith ) : bool
current this The current value.
toCompareWith DateTimeOffset Value to compare with.
리턴 bool

IsBefore() 공개 정적인 메소드

Determines whether the specified DateTimeOffset is before then current value.
public static IsBefore ( this current, DateTimeOffset toCompareWith ) : bool
current this The current value.
toCompareWith DateTimeOffset Value to compare with.
리턴 bool

IsInFuture() 공개 정적인 메소드

Determine if a DateTimeOffset is in the future.
public static IsInFuture ( this dateTime ) : bool
dateTime this The date to be checked.
리턴 bool

IsInPast() 공개 정적인 메소드

Determine if a DateTimeOffset is in the past.
public static IsInPast ( this dateTime ) : bool
dateTime this The date to be checked.
리턴 bool

LastDayOfMonth() 공개 정적인 메소드

Sets the day of the DateTimeOffset to the last day in that month.
public static LastDayOfMonth ( this current ) : DateTimeOffset
current this The current DateTimeOffset to be changed.
리턴 DateTimeOffset

LastDayOfQuarter() 공개 정적인 메소드

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
public static LastDayOfQuarter ( this current ) : DateTimeOffset
current this
리턴 DateTimeOffset

LastDayOfWeek() 공개 정적인 메소드

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
public static LastDayOfWeek ( this current ) : DateTimeOffset
current this The DateTimeOffset to adjust
리턴 DateTimeOffset

LastDayOfYear() 공개 정적인 메소드

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
public static LastDayOfYear ( this current ) : DateTimeOffset
current this The DateTimeOffset to adjust
리턴 DateTimeOffset

Midnight() 공개 정적인 메소드

Returns original DateTimeOffset value with time part set to midnight (alias for BeginningOfDay method).
public static Midnight ( this value ) : DateTimeOffset
value this
리턴 DateTimeOffset

Next() 공개 정적인 메소드

Returns first next occurrence of specified DayOfWeek.
public static Next ( this start, DayOfWeek day ) : DateTimeOffset
start this
day DayOfWeek
리턴 DateTimeOffset

NextDay() 공개 정적인 메소드

Returns DateTimeOffset increased by 24 hours ie Next Day.
public static NextDay ( this start ) : DateTimeOffset
start this
리턴 DateTimeOffset

NextMonth() 공개 정적인 메소드

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
public static NextMonth ( this current ) : DateTimeOffset
current this The DateTimeOffset to adjust
리턴 DateTimeOffset

NextYear() 공개 정적인 메소드

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.
public static NextYear ( this start ) : DateTimeOffset
start this
리턴 DateTimeOffset

Noon() 공개 정적인 메소드

Returns original DateTimeOffset value with time part set to Noon (12:00:00h).
public static Noon ( this value ) : DateTimeOffset
value this The find Noon for.
리턴 DateTimeOffset

Previous() 공개 정적인 메소드

Returns first next occurrence of specified DayOfWeek.
public static Previous ( this start, DayOfWeek day ) : DateTimeOffset
start this
day DayOfWeek
리턴 DateTimeOffset

PreviousDay() 공개 정적인 메소드

Returns DateTimeOffset decreased by 24h period ie Previous Day.
public static PreviousDay ( this start ) : DateTimeOffset
start this
리턴 DateTimeOffset

PreviousMonth() 공개 정적인 메소드

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
public static PreviousMonth ( this current ) : DateTimeOffset
current this The DateTimeOffset to adjust
리턴 DateTimeOffset

PreviousYear() 공개 정적인 메소드

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.
public static PreviousYear ( this start ) : DateTimeOffset
start this
리턴 DateTimeOffset

Round() 공개 정적인 메소드

public static Round ( this dateTime, RoundTo rt ) : DateTimeOffset
dateTime this
rt RoundTo
리턴 DateTimeOffset

SameDay() 공개 정적인 메소드

Determines whether the specified DateTimeOffset value is exactly the same day (day + month + year) then current
public static SameDay ( this current, DateTimeOffset date ) : bool
current this The current value
date DateTimeOffset Value to compare with
리턴 bool

SameMonth() 공개 정적인 메소드

Determines whether the specified DateTimeOffset value is exactly the same month (month + year) then current. Eg, 2015-12-01 and 2014-12-01 => False
public static SameMonth ( this current, DateTimeOffset date ) : bool
current this The current value
date DateTimeOffset Value to compare with
리턴 bool

SameYear() 공개 정적인 메소드

Determines whether the specified DateTimeOffset value is exactly the same year then current. Eg, 2015-12-01 and 2015-01-01 => True
public static SameYear ( this current, DateTimeOffset date ) : bool
current this The current value
date DateTimeOffset Value to compare with
리턴 bool

SetDate() 공개 정적인 메소드

Returns DateTimeOffset with changed Year part.
public static SetDate ( this value, int year ) : DateTimeOffset
value this
year int
리턴 DateTimeOffset

SetDate() 공개 정적인 메소드

Returns DateTimeOffset with changed Year and Month part.
public static SetDate ( this value, int year, int month ) : DateTimeOffset
value this
year int
month int
리턴 DateTimeOffset

SetDate() 공개 정적인 메소드

Returns DateTimeOffset with changed Year, Month and Day part.
public static SetDate ( this value, int year, int month, int day ) : DateTimeOffset
value this
year int
month int
day int
리턴 DateTimeOffset

SetDay() 공개 정적인 메소드

Returns DateTimeOffset with changed Day part.
public static SetDay ( this value, int day ) : DateTimeOffset
value this
day int
리턴 DateTimeOffset

SetHour() 공개 정적인 메소드

Returns DateTimeOffset with changed Hour part.
public static SetHour ( this originalDate, int hour ) : DateTimeOffset
originalDate this
hour int
리턴 DateTimeOffset

SetMillisecond() 공개 정적인 메소드

Returns DateTimeOffset with changed Millisecond part.
public static SetMillisecond ( this originalDate, int millisecond ) : DateTimeOffset
originalDate this
millisecond int
리턴 DateTimeOffset

SetMinute() 공개 정적인 메소드

Returns DateTimeOffset with changed Minute part.
public static SetMinute ( this originalDate, int minute ) : DateTimeOffset
originalDate this
minute int
리턴 DateTimeOffset

SetMonth() 공개 정적인 메소드

Returns DateTimeOffset with changed Month part.
public static SetMonth ( this value, int month ) : DateTimeOffset
value this
month int
리턴 DateTimeOffset

SetSecond() 공개 정적인 메소드

Returns DateTimeOffset with changed Second part.
public static SetSecond ( this originalDate, int second ) : DateTimeOffset
originalDate this
second int
리턴 DateTimeOffset

SetTime() 공개 정적인 메소드

Returns the original DateTimeOffset with Hour part changed to supplied hour parameter.
public static SetTime ( this originalDate, int hour ) : DateTimeOffset
originalDate this
hour int
리턴 DateTimeOffset

SetTime() 공개 정적인 메소드

Returns the original DateTimeOffset with Hour and Minute parts changed to supplied hour and minute parameters.
public static SetTime ( this originalDate, int hour, int minute ) : DateTimeOffset
originalDate this
hour int
minute int
리턴 DateTimeOffset

SetTime() 공개 정적인 메소드

Returns the original DateTimeOffset with Hour, Minute and Second parts changed to supplied hour, minute and second parameters.
public static SetTime ( this originalDate, int hour, int minute, int second ) : DateTimeOffset
originalDate this
hour int
minute int
second int
리턴 DateTimeOffset

SetTime() 공개 정적인 메소드

Returns the original DateTimeOffset with Hour, Minute, Second and Millisecond parts changed to supplied hour, minute, second and millisecond parameters.
public static SetTime ( this originalDate, int hour, int minute, int second, int millisecond ) : DateTimeOffset
originalDate this
hour int
minute int
second int
millisecond int
리턴 DateTimeOffset

SetYear() 공개 정적인 메소드

Returns DateTimeOffset with changed Year part.
public static SetYear ( this value, int year ) : DateTimeOffset
value this
year int
리턴 DateTimeOffset

SubtractBusinessDays() 공개 정적인 메소드

Subtracts the given number of business days to the 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.
리턴 DateTimeOffset

WeekAfter() 공개 정적인 메소드

Increases supplied DateTimeOffset for 7 days ie returns the Next Week.
public static WeekAfter ( this start ) : DateTimeOffset
start this
리턴 DateTimeOffset

WeekEarlier() 공개 정적인 메소드

Decreases supplied DateTimeOffset for 7 days ie returns the Previous Week.
public static WeekEarlier ( this start ) : DateTimeOffset
start this
리턴 DateTimeOffset