Returns a date that is rounded to the next even multiple of the given
minute.
Namespace: Quartz
Assembly: Quartz (in Quartz.dll) Version: 3.0.0
Syntax
C#
public static DateTimeOffset NextGivenMinuteDate( Nullable<DateTimeOffset> date, int minuteBase )
Parameters
- date
- Type: SystemNullableDateTimeOffset
- minuteBase
- Type: SystemInt32
Return Value
Type: DateTimeOffsetthe new rounded date
Remarks
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:
Input Time | Minute-Base | Result Time |
---|---|---|
11:16:41 | 20 | 11:20:00 |
11:36:41 | 20 | 11:40:00 |
11:46:41 | 20 | 12:00:00 |
11:26:41 | 30 | 11:30:00 |
11:36:41 | 30 | 12:00:00 |
11:16:41 | 17 | 11:17:00 |
11:17:41 | 17 | 11:34:00 |
11:52:41 | 17 | 12:00:00 |
11:52:41 | 5 | 11:55:00 |
11:57:41 | 5 | 12:00:00 |
11:17:41 | 0 | 12:00:00 |
11:17:41 | 1 | 11:08:00 |
See Also