trait IntervalStep
Properties
protectedClosure|null | $step | Step to apply instead of a fixed interval to get the new date. |
Methods
convertDate(DateTimeInterface$dateTime,bool$negated =false)
Take a date and apply either the step if set, or the current interval else.
Details
at line35
Closure
getStep()
Get the dynamic step in use.
at line47
setStep(Closure|null$step)
Set a step to apply instead of a fixed interval to get the new date.
Or pass null to switch to fixed interval.
at line62
CarbonInterface
convertDate(DateTimeInterface$dateTime,bool$negated =false)
Take a date and apply either the step if set, or the current interval else.
The interval/step is applied negatively (typically subtraction instead of addition) if $negated is true.