| Methods |
public
|
__construct(
Frequency $freq,
int $interval = 1,
?int $count = null,
DateTimeImmutable|string|null $until = null,
list<int> $bySecond = [],
list<int> $byMinute = [],
list<int> $byHour = [],
list<array{int, int}> $byDay = [],
list<int> $byMonthDay = [],
list<int> $byYearDay = [],
list<int> $byWeekNo = [],
list<int> $byMonth = [],
list<int> $bySetPos = [],
int<1, 7> $wkst = 1,
?string $rscale = null,
?Skip $skip = null,
list<int> $byLeapMonth = [],
)
Parameters
| $until |
parsed date, or a floating value resolved in the DTSTART timezone
|
| $byDay |
pairs of [ordinal (0 = every), weekday]
|
| $rscale |
calendar system in upper case (RFC 7529), null for a plain RFC 5545 rule
|
| $skip |
handling of invalid dates, null when not given (the default is OMIT); requires RSCALE
|
| $byLeapMonth |
leap months of BYMONTH, e.g. 5 for "5L"; requires RSCALE
|
|
#
|
public
static
|
fromString(string $rule, bool $ignoreSkipWithoutRscale = false): self
Parse a rule like "FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,WE".
With $ignoreSkipWithoutRscale, SKIP without RSCALE is ignored instead of rejected.
Parse a rule like "FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,WE".
With $ignoreSkipWithoutRscale, SKIP without RSCALE is ignored instead of rejected.
|
#
|
public
static
|
fromArray(array<string, mixed> $parts, bool $ignoreSkipWithoutRscale = false): self
Build a rule from rule parts; keys are case-insensitive and unknown parts are ignored.
UNTIL may be a string, a DateTimeInterface or a Unix timestamp.
With $ignoreSkipWithoutRscale, SKIP without RSCALE is ignored instead of rejected,
which is how rules were read before RFC 7529.
Build a rule from rule parts; keys are case-insensitive and unknown parts are ignored.
UNTIL may be a string, a DateTimeInterface or a Unix timestamp.
With $ignoreSkipWithoutRscale, SKIP without RSCALE is ignored instead of rejected,
which is how rules were read before RFC 7529.
|
#
|
public
|
toString(): string
Serialize the rule, e.g. "FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,WE".
Serialize the rule, e.g. "FREQ=WEEKLY;INTERVAL=2;BYDAY=MO,WE".
|
#
|
public
|
isGregorian(): bool
Whether the rule uses the Gregorian calendar, the only calendar system the Expander supports:
no RSCALE or RSCALE=GREGORIAN, and no leap months.
Whether the rule uses the Gregorian calendar, the only calendar system the Expander supports:
no RSCALE or RSCALE=GREGORIAN, and no leap months.
|
#
|
public
|
assertGregorian(): void
|
#
|
public
|
untilTimestamp(DateTimeZone $timezone): ?int
Resolve UNTIL to an instant; floating values use the given timezone.
A date-only UNTIL includes the whole day.
Resolve UNTIL to an instant; floating values use the given timezone.
A date-only UNTIL includes the whole day.
|
#
|
| Properties |
public
|
Frequency
|
$freq
|
#
|
public
|
int
|
$interval
|
#
|
public
|
?int
|
$count
|
#
|
public
|
DateTimeImmutable|string|null
|
$until
parsed date, or a floating value resolved in the DTSTART timezone
parsed date, or a floating value resolved in the DTSTART timezone
|
#
|
public
|
list<int>
|
$bySecond
|
#
|
public
|
list<int>
|
$byMinute
|
#
|
public
|
list<int>
|
$byHour
|
#
|
public
|
list<array{int, int}>
|
$byDay
pairs of [ordinal (0 = every), weekday]
pairs of [ordinal (0 = every), weekday]
|
#
|
public
|
list<int>
|
$byMonthDay
|
#
|
public
|
list<int>
|
$byYearDay
|
#
|
public
|
list<int>
|
$byWeekNo
|
#
|
public
|
list<int>
|
$byMonth
|
#
|
public
|
list<int>
|
$bySetPos
|
#
|
public
|
int<1, 7>
|
$wkst
|
#
|
public
|
?string
|
$rscale
calendar system in upper case (RFC 7529), null for a plain RFC 5545 rule
calendar system in upper case (RFC 7529), null for a plain RFC 5545 rule
|
#
|
public
|
?Skip
|
$skip
handling of invalid dates, null when not given (the default is OMIT); requires RSCALE
handling of invalid dates, null when not given (the default is OMIT); requires RSCALE
|
#
|
public
|
list<int>
|
$byLeapMonth
leap months of BYMONTH, e.g. 5 for "5L"; requires RSCALE
leap months of BYMONTH, e.g. 5 for "5L"; requires RSCALE
|
#
|