ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Calculates an ilDateList
for a given calendar entry and recurrence rule.
More...
Public Member Functions | |
__construct (ilDatePeriod $entry, ilCalendarRecurrenceCalculation $rec) | |
public More... | |
calculateDateListByMonth ($a_month, $a_year) | |
calculate day list by month(s) uses a cache of calculated recurring events public More... | |
calculateDateList (ilDateTime $a_start, ilDateTime $a_end, $a_limit=-1) | |
calculate date list More... | |
Protected Member Functions | |
getDuration () | |
Get duration of event. More... | |
applyDurationPeriod (ilDateList $list, ilDateTime $start, ilDateTime $end) | |
Apply duration period. More... | |
adjustTimeZones (ilDateTime $a_start, ilDateTime $a_end) | |
Adjust timezone. More... | |
optimizeStartingTime () | |
optimize starting time More... | |
incrementByFrequency ($start) | |
increment starting time by frequency More... | |
applyBYMONTHRules (ilDateList $list) | |
Apply BYMONTH rules. More... | |
applyBYWEEKNORules (ilDateList $list) | |
Apply BYWEEKNO rules (1 to 53 and -1 to -53). More... | |
applyBYYEARDAYRules (ilDateList $list) | |
Apply BYYEARDAY rules. More... | |
applyBYMONTHDAYRules (ilDateList $list) | |
Apply BYMONTHDAY rules. More... | |
applyBYDAYRules (ilDateList $list) | |
Apply BYDAY rules. More... | |
getYearWeekDays (ilDateTime $seed) | |
get a list of year week days according to the BYMONTH rule More... | |
getMonthWeekDays ($year, $month) | |
get a list of month days More... | |
getWeekWeekDays ($seed_info) | |
get weedays of week More... | |
applyBYSETPOSRules (ilDateList $list) | |
Apply BYSETPOST rules. More... | |
applyLimits (ilDateList $list) | |
Apply limits (count or until) More... | |
applyExclusionDates () | |
initDateList () | |
init date list More... | |
createDate ($a_date, $a_format_type=IL_CAL_UNIX) | |
create date More... | |
validateRecurrence () | |
validate recurrence More... | |
Protected Attributes | |
$timezone = null | |
$log = null | |
$limit_reached = false | |
$valid_dates = null | |
$period_start = null | |
$period_end = null | |
$start = null | |
$event = null | |
$duration = null | |
$recurrence = null | |
$frequence_context = 0 | |
Calculates an ilDateList
for a given calendar entry and recurrence rule.
Definition at line 41 of file class.ilCalendarRecurrenceCalculator.php.
ilCalendarRecurrenceCalculator::__construct | ( | ilDatePeriod | $entry, |
ilCalendarRecurrenceCalculation | $rec | ||
) |
public
ilDatePeriod | interface ilDatePeriod |
Definition at line 65 of file class.ilCalendarRecurrenceCalculator.php.
References $GLOBALS, ilDatePeriod\getEnd(), ilDatePeriod\getStart(), and IL_CAL_UNIX.
|
protected |
Adjust timezone.
protected
Definition at line 231 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 558 of file class.ilCalendarRecurrenceCalculator.php.
References $list, $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 462 of file class.ilCalendarRecurrenceCalculator.php.
References $h, $i, $list, $s, $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 322 of file class.ilCalendarRecurrenceCalculator.php.
References $list, createDate(), 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 726 of file class.ilCalendarRecurrenceCalculator.php.
References $list, 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 361 of file class.ilCalendarRecurrenceCalculator.php.
References $list, 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 408 of file class.ilCalendarRecurrenceCalculator.php.
References $list, 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 duration period.
ilDateList | $list |
Definition at line 205 of file class.ilCalendarRecurrenceCalculator.php.
References $list, ilDateTime\_after(), ilDateTime\_before(), getDuration(), and ilDateTime\MINUTE.
Referenced by calculateDateList().
|
protected |
ilDateList | $list |
Definition at line 808 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by calculateDateList().
|
protected |
Apply limits (count or until)
protected
object | ilDateList |
Definition at line 754 of file class.ilCalendarRecurrenceCalculator.php.
References $res, ilDateTime\_after(), ilDateTime\_before(), 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 105 of file class.ilCalendarRecurrenceCalculator.php.
References $period_end, $period_start, $start, $time, $valid_dates, ilDateTime\_after(), ilDateTime\_before(), ilDateTime\_equals(), ilTimeZone\_restoreDefaultTimeZone(), adjustTimeZones(), applyBYDAYRules(), applyBYMONTHDAYRules(), applyBYMONTHRules(), applyBYSETPOSRules(), applyBYWEEKNORules(), applyBYYEARDAYRules(), applyDurationPeriod(), applyExclusionDates(), applyLimits(), IL_CAL_DAY, incrementByFrequency(), initDateList(), optimizeStartingTime(), and validateRecurrence().
Referenced by ilConsultationHoursGUI\createAppointments(), and 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 91 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
create date
protected
Definition at line 833 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by applyBYDAYRules(), applyBYMONTHDAYRules(), applyBYMONTHRules(), applyBYWEEKNORules(), applyBYYEARDAYRules(), and optimizeStartingTime().
|
protected |
Get duration of event.
Definition at line 78 of file class.ilCalendarRecurrenceCalculator.php.
References $duration.
Referenced by applyDurationPeriod().
|
protected |
get a list of month days
protected
Definition at line 674 of file class.ilCalendarRecurrenceCalculator.php.
References $i, ilCalendarUtil\_getMaxDayOfMonth(), IL_CAL_DATE, and IL_CAL_FKT_GETDATE.
Referenced by applyBYDAYRules().
|
protected |
get weedays of week
protected
Definition at line 707 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 642 of file class.ilCalendarRecurrenceCalculator.php.
References $i, $start, $time, 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 286 of file class.ilCalendarRecurrenceCalculator.php.
References $DIC, $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 823 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 262 of file class.ilCalendarRecurrenceCalculator.php.
References $start, $time, ilDateTime\_before(), createDate(), IL_CAL_UNIX, and incrementByFrequency().
Referenced by calculateDateList().
|
protected |
validate recurrence
protected
Definition at line 849 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by calculateDateList().
|
protected |
Definition at line 53 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by getDuration().
|
protected |
Definition at line 52 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 56 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 46 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 44 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 49 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by calculateDateList().
|
protected |
Definition at line 48 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by calculateDateList().
|
protected |
Definition at line 54 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 50 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by applyBYDAYRules(), calculateDateList(), getYearWeekDays(), incrementByFrequency(), and optimizeStartingTime().
|
protected |
Definition at line 43 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 47 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by calculateDateList().