Méthode | Description | ||||||||||||||||||||||||||||||||||||||||
---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|---|
AtHourMinuteAndSecond ( int hour, int minute, int second ) : |
|||||||||||||||||||||||||||||||||||||||||
AtHourOfDay ( int hour ) : |
Set the hour (0-23) for the Date that will be built by this builder.
|
||||||||||||||||||||||||||||||||||||||||
AtMinute ( int minute ) : |
Set the minute (0-59) for the Date that will be built by this builder.
|
||||||||||||||||||||||||||||||||||||||||
AtSecond ( int second ) : |
Set the second (0-59) for the Date that will be built by this builder, and truncate the milliseconds to 000.
|
||||||||||||||||||||||||||||||||||||||||
Build ( ) : DateTimeOffset |
Build the DateTimeOffset defined by this builder instance.
|
||||||||||||||||||||||||||||||||||||||||
DateOf ( int hour, int minute, int second ) : DateTimeOffset |
Get a DateTimeOffset object that represents the given time, on today's date.
|
||||||||||||||||||||||||||||||||||||||||
DateOf ( int hour, int minute, int second, int dayOfMonth, int month ) : DateTimeOffset |
Get a DateTimeOffset object that represents the given time, on the given date.
|
||||||||||||||||||||||||||||||||||||||||
DateOf ( int hour, int minute, int second, int dayOfMonth, int month, int year ) : DateTimeOffset |
Get a DateTimeOffset object that represents the given time, on the given date.
|
||||||||||||||||||||||||||||||||||||||||
EvenHourDate ( DateTimeOffset date ) : DateTimeOffset |
Returns a date that is rounded to the next even hour above the given date. For example an input date with a time of 08:13:54 would result in a date with the time of 09:00:00. If the date's time is in the 23rd hour, the date's 'day' will be promoted, and the time will be set to 00:00:00. |
||||||||||||||||||||||||||||||||||||||||
EvenHourDateAfterNow ( ) : DateTimeOffset |
Returns a date that is rounded to the next even hour after the current time. For example a current time of 08:13:54 would result in a date with the time of 09:00:00. If the date's time is in the 23rd hour, the date's 'day' will be promoted, and the time will be set to 00:00:00. |
||||||||||||||||||||||||||||||||||||||||
EvenHourDateBefore ( DateTimeOffset date ) : DateTimeOffset |
Returns a date that is rounded to the previous even hour below the given date. For example an input date with a time of 08:13:54 would result in a date with the time of 08:00:00. |
||||||||||||||||||||||||||||||||||||||||
EvenMinuteDate ( DateTimeOffset date ) : DateTimeOffset |
Returns a date that is rounded to the next even minute above the given date. For example an input date with a time of 08:13:54 would result in a date with the time of 08:14:00. If the date's time is in the 59th minute, then the hour (and possibly the day) will be promoted. |
||||||||||||||||||||||||||||||||||||||||
EvenMinuteDateAfterNow ( ) : DateTimeOffset |
Returns a date that is rounded to the next even minute after the current time. For example a current time of 08:13:54 would result in a date with the time of 08:14:00. If the date's time is in the 59th minute, then the hour (and possibly the day) will be promoted. |
||||||||||||||||||||||||||||||||||||||||
EvenMinuteDateBefore ( DateTimeOffset date ) : DateTimeOffset |
Returns a date that is rounded to the previous even minute below the given date. For example an input date with a time of 08:13:54 would result in a date with the time of 08:13:00. |
||||||||||||||||||||||||||||||||||||||||
EvenSecondDate ( DateTimeOffset date ) : DateTimeOffset |
Returns a date that is rounded to the next even second above the given date.
|
||||||||||||||||||||||||||||||||||||||||
EvenSecondDateAfterNow ( ) : DateTimeOffset |
Returns a date that is rounded to the next even second after the current time.
|
||||||||||||||||||||||||||||||||||||||||
EvenSecondDateBefore ( DateTimeOffset date ) : DateTimeOffset |
Returns a date that is rounded to the previous even second below the given date. For example an input date with a time of 08:13:54.341 would result in a date with the time of 08:13:00.000. |
||||||||||||||||||||||||||||||||||||||||
FutureDate ( int interval, IntervalUnit unit ) : DateTimeOffset | |||||||||||||||||||||||||||||||||||||||||
InMonth ( int month ) : |
Set the month (1-12) for the Date that will be built by this builder.
|
||||||||||||||||||||||||||||||||||||||||
InMonthOnDay ( int month, int day ) : |
|||||||||||||||||||||||||||||||||||||||||
InTimeZone ( |
Set the TimeZoneInfo for the Date that will be built by this builder (if "null", system default will be used)
|
||||||||||||||||||||||||||||||||||||||||
InYear ( int year ) : |
Set the year for the Date that will be built by this builder.
|
||||||||||||||||||||||||||||||||||||||||
NewDate ( ) : |
Create a DateBuilder, with initial settings for the current date and time in the system default timezone.
|
||||||||||||||||||||||||||||||||||||||||
NewDateInTimeZone ( |
Create a DateBuilder, with initial settings for the current date and time in the given timezone.
|
||||||||||||||||||||||||||||||||||||||||
NextGivenMinuteDate ( DateTimeOffset date, int minuteBase ) : DateTimeOffset |
Returns a date that is rounded to the next even multiple of the given minute. For example an input date with a time of 08:13:54, and an input minute-base of 5 would result in a date with the time of 08:15:00. The same input date with an input minute-base of 10 would result in a date with the time of 08:20:00. But a date with the time 08:53:31 and an input minute-base of 45 would result in 09:00:00, because the even-hour is the next 'base' for 45-minute intervals. More examples:
|
||||||||||||||||||||||||||||||||||||||||
NextGivenSecondDate ( DateTimeOffset date, int secondBase ) : DateTimeOffset |
Returns a date that is rounded to the next even multiple of the given minute. The rules for calculating the second are the same as those for calculating the minute in the method NextGivenMinuteDate. |
||||||||||||||||||||||||||||||||||||||||
OnDay ( int day ) : |
Set the day of month (1-31) for the Date that will be built by this builder.
|
||||||||||||||||||||||||||||||||||||||||
TodayAt ( int hour, int minute, int second ) : DateTimeOffset |
Get a DateTimeOffset object that represents the given time, on today's date (equivalent to DateOf(int,int,int)).
|
||||||||||||||||||||||||||||||||||||||||
TomorrowAt ( int hour, int minute, int second ) : DateTimeOffset |
Get a DateTimeOffset object that represents the given time, on tomorrow's date.
|
||||||||||||||||||||||||||||||||||||||||
ValidateDayOfMonth ( int day ) : void | |||||||||||||||||||||||||||||||||||||||||
ValidateHour ( int hour ) : void | |||||||||||||||||||||||||||||||||||||||||
ValidateMinute ( int minute ) : void | |||||||||||||||||||||||||||||||||||||||||
ValidateMonth ( int month ) : void | |||||||||||||||||||||||||||||||||||||||||
ValidateSecond ( int second ) : void | |||||||||||||||||||||||||||||||||||||||||
ValidateYear ( int year ) : void |
Méthode | Description | |
---|---|---|
DateBuilder ( ) : System |
Create a DateBuilder, with initial settings for the current date and time in the system default timezone.
|
|
DateBuilder ( |
Create a DateBuilder, with initial settings for the current date and time in the given timezone.
|
|
TranslatedAdd ( DateTimeOffset date, IntervalUnit unit, int amountToAdd ) : DateTimeOffset |
public AtHourMinuteAndSecond ( int hour, int minute, int second ) : |
||
hour | int | |
minute | int | |
second | int | |
Résultat |
public AtHourOfDay ( int hour ) : |
||
hour | int | |
Résultat |
public AtMinute ( int minute ) : |
||
minute | int | |
Résultat |
public AtSecond ( int second ) : |
||
second | int | |
Résultat |
public static DateOf ( int hour, int minute, int second ) : DateTimeOffset | ||
hour | int | The value (0-23) to give the hours field of the date |
minute | int | The value (0-59) to give the minutes field of the date |
second | int | The value (0-59) to give the seconds field of the date |
Résultat | DateTimeOffset |
public static DateOf ( int hour, int minute, int second, int dayOfMonth, int month ) : DateTimeOffset | ||
hour | int | The value (0-23) to give the hours field of the date |
minute | int | The value (0-59) to give the minutes field of the date |
second | int | The value (0-59) to give the seconds field of the date |
dayOfMonth | int | The value (1-31) to give the day of month field of the date |
month | int | The value (1-12) to give the month field of the date |
Résultat | DateTimeOffset |
public static DateOf ( int hour, int minute, int second, int dayOfMonth, int month, int year ) : DateTimeOffset | ||
hour | int | The value (0-23) to give the hours field of the date |
minute | int | The value (0-59) to give the minutes field of the date |
second | int | The value (0-59) to give the seconds field of the date |
dayOfMonth | int | The value (1-31) to give the day of month field of the date |
month | int | The value (1-12) to give the month field of the date |
year | int | The value (1970-2099) to give the year field of the date |
Résultat | DateTimeOffset |
public static EvenHourDate ( DateTimeOffset date ) : DateTimeOffset | ||
date | DateTimeOffset | the Date to round, if |
Résultat | DateTimeOffset |
public static EvenHourDateAfterNow ( ) : DateTimeOffset | ||
Résultat | DateTimeOffset |
public static EvenHourDateBefore ( DateTimeOffset date ) : DateTimeOffset | ||
date | DateTimeOffset | the Date to round, if |
Résultat | DateTimeOffset |
public static EvenMinuteDate ( DateTimeOffset date ) : DateTimeOffset | ||
date | DateTimeOffset | The Date to round, if |
Résultat | DateTimeOffset |
public static EvenMinuteDateAfterNow ( ) : DateTimeOffset | ||
Résultat | DateTimeOffset |
public static EvenMinuteDateBefore ( DateTimeOffset date ) : DateTimeOffset | ||
date | DateTimeOffset | the Date to round, if |
Résultat | DateTimeOffset |
public static EvenSecondDate ( DateTimeOffset date ) : DateTimeOffset | ||
date | DateTimeOffset | |
Résultat | DateTimeOffset |
public static EvenSecondDateAfterNow ( ) : DateTimeOffset | ||
Résultat | DateTimeOffset |
public static EvenSecondDateBefore ( DateTimeOffset date ) : DateTimeOffset | ||
date | DateTimeOffset | |
Résultat | DateTimeOffset |
public static FutureDate ( int interval, IntervalUnit unit ) : DateTimeOffset | ||
interval | int | |
unit | IntervalUnit | |
Résultat | DateTimeOffset |
public InMonthOnDay ( int month, int day ) : |
||
month | int | |
day | int | |
Résultat |
public InTimeZone ( |
||
tz | ||
Résultat |
public static NewDateInTimeZone ( |
||
tz | Time zone to use. | |
Résultat |
public static NextGivenMinuteDate ( DateTimeOffset date, int minuteBase ) : DateTimeOffset | ||
date | DateTimeOffset | |
minuteBase | int | |
Résultat | DateTimeOffset |
public static NextGivenSecondDate ( DateTimeOffset date, int secondBase ) : DateTimeOffset | ||
date | DateTimeOffset | the Date to round, if |
secondBase | int | the base-second to set the time on |
Résultat | DateTimeOffset |
public static TodayAt ( int hour, int minute, int second ) : DateTimeOffset | ||
hour | int | |
minute | int | |
second | int | |
Résultat | DateTimeOffset |
public static TomorrowAt ( int hour, int minute, int second ) : DateTimeOffset | ||
hour | int | |
minute | int | |
second | int | |
Résultat | DateTimeOffset |
public static ValidateDayOfMonth ( int day ) : void | ||
day | int | |
Résultat | void |
public static ValidateHour ( int hour ) : void | ||
hour | int | |
Résultat | void |
public static ValidateMinute ( int minute ) : void | ||
minute | int | |
Résultat | void |
public static ValidateMonth ( int month ) : void | ||
month | int | |
Résultat | void |
public static ValidateSecond ( int second ) : void | ||
second | int | |
Résultat | void |
public static ValidateYear ( int year ) : void | ||
year | int | |
Résultat | void |