everyDayOfWeek
fn
TP delegate(scope const TP) everyDayOfWeek(TP, Direction dir = Direction.fwd)(DayOfWeek dayOfWeek) if (isTimePoint!TP &&
(dir == Direction.fwd || dir == Direction.bwd) &&
__traits(hasMember, TP, "dayOfWeek") &&
!__traits(isStaticFunction, TP.dayOfWeek) &&
is(typeof(TP.dayOfWeek) == DayOfWeek)) nothrowRange-generating function.
Returns a delegate which returns the next time point with the given DayOfWeek in a range.
Using this delegate allows iteration over successive time points which are all the same day of the week. e.g. passing DayOfWeek.mon to everyDayOfWeek would result in a delegate which could be used to iterate over all of the Mondays in a range.
Parameters
dir | The direction to iterate in. If passing the return value to fwdRange, use Direction.fwd. If passing it to bwdRange, use Direction.bwd. |
dayOfWeek | The week that each time point in the range will be. |