Documentation

StructuredCalendarSpec
in package
uses CloneWith

FinalYes

StructuredCalendarSpec describes an event specification relative to the calendar, in a form that's easy to work with programmatically. Each field can be one or more ranges.

A timestamp matches if at least one range of each field matches the corresponding fields of the timestamp, except for year: if year is missing, that means all years match. For all fields besides year, at least one Range must be present to match anything.

Tags
see
StructuredCalendarSpec

Table of Contents

Properties

$comment  : string
Free-form comment describing the intention of this spec.
$daysOfMonth  : array<string|int, mixed>
Match days of the month (1-31)
$daysOfWeek  : array<string|int, mixed>
Match days of the week (0-6; 0 is Sunday).
$hours  : array<string|int, mixed>
Match hours (0-23)
$minutes  : array<string|int, mixed>
Match minutes (0-59)
$months  : array<string|int, mixed>
Match months (1-12)
$seconds  : array<string|int, mixed>
Match seconds (0-59)
$years  : array<string|int, mixed>
Match years.

Methods

new()  : self
withAddedDayOfMonth()  : self
withAddedDayOfWeek()  : self
withAddedHour()  : self
withAddedMinute()  : self
withAddedMonth()  : self
withAddedSecond()  : self
withAddedYear()  : self
withComment()  : self
withDaysOfMonth()  : self
withDaysOfWeek()  : self
withHours()  : self
withMinutes()  : self
withMonths()  : self
withSeconds()  : self
withYears()  : self
__construct()  : mixed

Properties

$comment read-only

Free-form comment describing the intention of this spec.

public string $comment

$daysOfMonth read-only

Match days of the month (1-31)

public array<string|int, mixed> $daysOfMonth

$daysOfWeek read-only

Match days of the week (0-6; 0 is Sunday).

public array<string|int, mixed> $daysOfWeek

Methods

withComment()

public withComment(string $comment) : self
Parameters
$comment : string
Return values
self

        
On this page

Search results