ILIAS
Release_4_4_x_branch Revision 61816
|
Calculates an ilDateList
for a given calendar entry and recurrence rule.
More...
Public Member Functions | |
__construct (ilDatePeriod $entry, ilCalendarRecurrenceCalculation $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) | |
applyExclusionDates () | |
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 41 of file class.ilCalendarRecurrenceCalculator.php.
ilCalendarRecurrenceCalculator::__construct | ( | ilDatePeriod | $entry, |
ilCalendarRecurrenceCalculation | $rec | ||
) |
public
ilDatePeriod | interface ilDatePeriod |
Definition at line 64 of file class.ilCalendarRecurrenceCalculator.php.
References $ilLog.
|
protected |
Adjust timezone.
protected
Definition at line 199 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 563 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 457 of file class.ilCalendarRecurrenceCalculator.php.
References 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 297 of file class.ilCalendarRecurrenceCalculator.php.
References 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 755 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 343 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 396 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 |
ilDateList | $list |
Definition at line 852 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by calculateDateList().
|
protected |
Apply limits (count or until)
protected
object | ilDateList |
Definition at line 787 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 96 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(), 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 81 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
create date
protected
Definition at line 879 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 698 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 735 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 663 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 262 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 869 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 236 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 898 of file class.ilCalendarRecurrenceCalculator.php.
Referenced by calculateDateList().
|
protected |
Definition at line 52 of file class.ilCalendarRecurrenceCalculator.php.
|
protected |
Definition at line 55 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 53 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().