Class AbstractRepetition

Abstract repetition class This class is used to define and match against various time windows.

Concrete\Core\Foundation\Repetition\AbstractRepetition implements Concrete\Core\Foundation\Repetition\RepetitionInterface

Direct known subclasses

Concrete\Core\Permission\Duration

Abstract
Namespace: Concrete\Core\Foundation\Repetition
Package: Concrete\Core\Foundation\Repetition
Located at src/Foundation/Repetition/AbstractRepetition.php

Methods summary

public boolean
public
# setStartDateAllDay( boolean $start_date_all_day )

Toggle whether start_date is all day.

public boolean
public
# setEndDateAllDay( boolean $end_date_all_day )

Toggle whether end_date is all day.

public boolean
# isActive( integer|null $now = null )
public array|null
# getActiveRange( $now = null )
public boolean
public integer
# getRepeatPeriod( )
public
# setRepeatPeriod( integer $repeat_period )
public string
public
# setStartDate( $start_date )

Set the start date.

public string
public
# setEndDate( $end_date )

Set the end date.

protected
# rangeFromTime( $start, $end = null )
public string
# getRepeatPeriodEnd( )
public mixed
# setRepeatPeriodEnd( $repeat_period_end )
public integer
public mixed
# setRepeatEveryNum( $repeat_every_num )
public int[]
public mixed
# setRepeatPeriodWeekDays( int[] $repeat_period_week_days )
public integer
# getRepeatMonthBy( )
public mixed
# setRepeatMonthBy( integer $repeat_month_by )
public string
public
public
# getRepeatPeriodEveryNum( )

This method is deprecated, use getRepeatEveryNum.

public integer
# getRepeatMonthLastWeekday( )
public
# setRepeatMonthLastWeekday( integer $repeatMonthLastWeekday )
public array[]
# activeRangesBetween( integer $start, integer $end )
protected
# getDayString( $day )
protected DateInterval
# dateDiffNoDST( DateTime $from, DateTime $to )

Returns the difference between two DateTime objects without considering DST changes.

Constants summary

Properties summary

protected string $startDate

Date string of the start date/time

#
protected string $endDate

Date string of the end date/time

#
protected boolean $startDateAllDay

Does the startDate include a time or should we just use the entire day?

#
protected boolean $endDateAllDay

Does the endDate include a time, or should we just use the entire day?

#
protected integer $repeatPeriod

self::REPEAT_* enum [ ::REPEAT_DAILY | ::REPEAT_WEEKLY | ::REPEAT_MONTHLY ]

#
protected int[] $repeatPeriodWeekDays

List of numeric representations of the day of the week 0 for sunday, 6 for saturday.

#
protected integer $repeatEveryNum

Number for the repeatPeriod

#
protected integer $repeatMonthBy

self::MONTHLY_REPEAT_* enum [ ::MONTHLY_REPEAT_WEEKLY | ::MONTHLY_REPEAT_MONTHLY | ::MONTHLY_REPEAT_LAST_WEEKDAY ]

#
protected integer $repeatMonthLastWeekday

The week day number

#
protected string $repeatPeriodEnd

Time string of the last possible time for repetition

#