ILIAS
Release_4_0_x_branch Revision 61816
|
Calculates an ilDateList
for a given calendar entry and recurrence rule.
More...
Public Member Functions | |
__construct (ilDatePeriod $entry, ilCalendarRecurrence $rec) | |
public | |
calculateDateListByMonth ($a_month, $a_year) | |
calculate day list by month(s) uses a cache of calculated recurring events public | |
calculateDateList (ilDateTime $a_start, ilDateTime $a_end, $a_limit=-1) | |
calculate date list |
Protected Member Functions | |
adjustTimeZones (ilDateTime $a_start, ilDateTime $a_end) | |
Adjust timezone. | |
optimizeStartingTime () | |
optimize starting time | |
incrementByFrequency ($start) | |
increment starting time by frequency | |
applyBYMONTHRules (ilDateList $list) | |
Apply BYMONTH rules. | |
applyBYWEEKNORules (ilDateList $list) | |
Apply BYWEEKNO rules (1 to 53 and -1 to -53). | |
applyBYYEARDAYRules (ilDateList $list) | |
Apply BYYEARDAY rules. | |
applyBYMONTHDAYRules (ilDateList $list) | |
Apply BYMONTHDAY rules. | |
applyBYDAYRules (ilDateList $list) | |
Apply BYDAY rules. | |
getYearWeekDays (ilDateTime $seed) | |
get a list of year week days according to the BYMONTH rule | |
getMonthWeekDays ($year, $month) | |
get a list of month days | |
getWeekWeekDays ($seed_info) | |
get weedays of week | |
applyBYSETPOSRules (ilDateList $list) | |
Apply BYSETPOST rules. | |
applyLimits (ilDateList $list) | |
Apply limits (count or until) | |
initDateList () | |
init date list | |
createDate ($a_date, $a_format_type=IL_CAL_UNIX) | |
create date | |
validateRecurrence () | |
validate recurrence |
Protected Attributes | |
$timezone = null | |
$log = null | |
$limit_reached = false | |
$valid_dates = null | |
$period_start = null | |
$period_end = null | |
$start = null | |
$event = null | |
$recurrence = null | |
$frequence_context = 0 |
Calculates an ilDateList
for a given calendar entry and recurrence rule.
Definition at line 39 of file class.ilCalendarRecurrenceCalculator.php.
ilCalendarRecurrenceCalculator::__construct | ( | ilDatePeriod | $entry, |
ilCalendarRecurrence | $rec | ||
) |
public
ilDatePeriod | interface ilDatePeriod |
Definition at line 62 of file class.ilCalendarRecurrenceCalculator.php.
References $ilLog.
|
protected |
Adjust timezone.
protected
Definition at line 186 of file class.ilCalendarRecurrenceCalculator.php.
References ilTimeZone\_setDefaultTimeZone(), ilDateTime\switchTimeZone(), and ilTimeZone\UTC.
Referenced by calculateDateList().
|
protected |
Apply BYDAY rules.
protected
object | ilDateList |
Definition at line 550 of file class.ilCalendarRecurrenceCalculator.php.
References $start, createDate(), ilCalendarRecurrence\FREQ_DAILY, ilCalendarRecurrence\FREQ_MONTHLY, ilCalendarRecurrence\FREQ_WEEKLY, ilCalendarRecurrence\FREQ_YEARLY, ilDateList\get(), getMonthWeekDays(), getWeekWeekDays(), getYearWeekDays(), IL_CAL_DAY, IL_CAL_FKT_DATE, IL_CAL_FKT_GETDATE, and initDateList().
Referenced by calculateDateList().
|
protected |
Apply BYMONTHDAY rules.
protected
Definition at line 444 of file class.ilCalendarRecurrenceCalculator.php.
References $y, ilTimeZone\_getInstance(), ilCalendarUtil\_getMaxDayOfMonth(), createDate(), ilDateTime\DAY, ilCalendarRecurrence\FREQ_DAILY, ilCalendarRecurrence\FREQ_MONTHLY, ilCalendarRecurrence\FREQ_WEEKLY, ilCalendarRecurrence\FREQ_YEARLY, ilDateList\get(), IL_CAL_FKT_DATE, IL_CAL_UNIX, and initDateList().
Referenced by calculateDateList().
|
protected |
Apply BYMONTH rules.
protected
Definition at line 284 of file class.ilCalendarRecurrenceCalculator.php.
References createDate(), elseif(), ilCalendarRecurrence\FREQ_MONTHLY, ilCalendarRecurrence\FREQ_YEARLY, ilDateList\get(), IL_CAL_FKT_DATE, IL_CAL_UNIX, initDateList(), and ilDateTime\MONTH.
Referenced by calculateDateList().
|
protected |
Apply BYSETPOST rules.
protected
object | ilDateList |
Definition at line 742 of file class.ilCalendarRecurrenceCalculator.php.
References ilDateList\get(), ilDateList\getAtPosition(), initDateList(), and ilDateList\sort().
Referenced by calculateDateList().
|
protected |
Apply BYWEEKNO rules (1 to 53 and -1 to -53).
This rule can only be applied to YEARLY rules (RFC 2445 4.3.10)
protected
Definition at line 330 of file class.ilCalendarRecurrenceCalculator.php.
References createDate(), ilCalendarRecurrence\FREQ_MONTHLY, ilCalendarRecurrence\FREQ_WEEKLY, ilCalendarRecurrence\FREQ_YEARLY, ilDateList\get(), IL_CAL_FKT_DATE, IL_CAL_UNIX, initDateList(), and ilDateTime\WEEK.
Referenced by calculateDateList().
|
protected |
Apply BYYEARDAY rules.
protected
Definition at line 383 of file class.ilCalendarRecurrenceCalculator.php.
References createDate(), ilDateTime\DAY, ilCalendarRecurrence\FREQ_DAILY, ilCalendarRecurrence\FREQ_MONTHLY, ilCalendarRecurrence\FREQ_WEEKLY, ilCalendarRecurrence\FREQ_YEARLY, ilDateList\get(), IL_CAL_FKT_DATE, IL_CAL_UNIX, and initDateList().
Referenced by calculateDateList().
|
protected |
Apply limits (count or until)
protected
object | ilDateList |
Definition at line 774 of file class.ilCalendarRecurrenceCalculator.php.
References $res, ilDateTime\_after(), ilDateTime\_before(), elseif(), ilDateList\get(), IL_CAL_DAY, ilDateList\remove(), and ilDateList\sort().
Referenced by calculateDateList().
ilCalendarRecurrenceCalculator::calculateDateList | ( | ilDateTime | $a_start, |
ilDateTime | $a_end, | ||
$a_limit = -1 |
|||
) |
calculate date list
public
object | ilDateTime start of period |
object | ilDateTime end of period |
int | limit number of returned dates |
Definition at line 94 of file class.ilCalendarRecurrenceCalculator.php.
References $period_end, $period_start, $start, $valid_dates, ilDateTime\_after(), ilDateTime\_before(), ilDateTime\_equals(), ilTimeZone\_restoreDefaultTimeZone(), adjustTimeZones(), applyBYDAYRules(), applyBYMONTHDAYRules(), applyBYMONTHRules(), applyBYSETPOSRules(), applyBYWEEKNORules(), applyBYYEARDAYRules(), applyLimits(), IL_CAL_DAY, incrementByFrequency(), initDateList(), optimizeStartingTime(), and validateRecurrence().
Referenced by ilObjSessionGUI\createRecurringSessions().
ilCalendarRecurrenceCalculator::calculateDateListByMonth | ( | $a_month, | |
$a_year | |||
) |
calculate day list by month(s) uses a cache of calculated recurring events public
int | month |
int | year |
Definition at line 79 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
create date
protected
Definition at line 839 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by applyBYDAYRules(), applyBYMONTHDAYRules(), applyBYMONTHRules(), applyBYWEEKNORules(), applyBYYEARDAYRules(), and optimizeStartingTime().
|
protected |
get a list of month days
protected
@return |
Definition at line 685 of file class.ilCalendarRecurrenceCalculator.php.
References ilCalendarUtil\_getMaxDayOfMonth(), IL_CAL_DATE, and IL_CAL_FKT_GETDATE.
Referenced by applyBYDAYRules().
|
protected |
get weedays of week
protected
@return |
Definition at line 722 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by applyBYDAYRules().
|
protected |
get a list of year week days according to the BYMONTH rule
protected
Definition at line 650 of file class.ilCalendarRecurrenceCalculator.php.
References $start, ilCalendarUtil\_isLeapYear(), ilDateTime\get(), IL_CAL_DATE, and IL_CAL_FKT_DATE.
Referenced by applyBYDAYRules().
|
protected |
increment starting time by frequency
protected
Definition at line 249 of file class.ilCalendarRecurrenceCalculator.php.
References $ilLog, $start, ilDateTime\DAY, ilCalendarRecurrence\FREQ_DAILY, ilCalendarRecurrence\FREQ_MONTHLY, ilCalendarRecurrence\FREQ_WEEKLY, ilCalendarRecurrence\FREQ_YEARLY, ilDateTime\MONTH, ilDateTime\WEEK, and ilDateTime\YEAR.
Referenced by calculateDateList(), and optimizeStartingTime().
|
protected |
init date list
protected
Definition at line 829 of file class.ilCalendarRecurrenceCalculator.php.
References ilDateList\TYPE_DATE, and ilDateList\TYPE_DATETIME.
Referenced by applyBYDAYRules(), applyBYMONTHDAYRules(), applyBYMONTHRules(), applyBYSETPOSRules(), applyBYWEEKNORules(), applyBYYEARDAYRules(), and calculateDateList().
|
protected |
optimize starting time
protected
Definition at line 223 of file class.ilCalendarRecurrenceCalculator.php.
References $start, ilDateTime\_before(), createDate(), IL_CAL_UNIX, and incrementByFrequency().
Referenced by calculateDateList().
|
protected |
validate recurrence
protected
Definition at line 858 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by calculateDateList().
|
protected |
Definition at line 50 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 53 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 44 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 42 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 47 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by calculateDateList().
|
protected |
Definition at line 46 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by calculateDateList().
|
protected |
Definition at line 51 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 48 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by applyBYDAYRules(), calculateDateList(), getYearWeekDays(), incrementByFrequency(), and optimizeStartingTime().
|
protected |
Definition at line 41 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 45 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by calculateDateList().