DateBuilderNextGivenMinuteDate Method

Quartz.NET 3.0 API Documentation
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: DateTimeOffset
the 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 TimeMinute-BaseResult Time
11:16:412011:20:00
11:36:412011:40:00
11:46:412012:00:00
11:26:413011:30:00
11:36:413012:00:00
11:16:411711:17:00
11:17:411711:34:00
11:52:411712:00:00
11:52:41511:55:00
11:57:41512:00:00
11:17:41012:00:00
11:17:41111:08:00

See Also

Reference