ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Class ilCalendarUtil. More...
Static Public Member Functions | |
static | _isToday ($date) |
check if a date is today More... | |
static | _numericMonthToString ($a_month, $a_long=true) |
numeric month to string More... | |
static | _numericDayToString ($a_day, $a_long=true) |
get More... | |
static | _buildWeekDayList ($a_day, $a_weekstart) |
build week day list More... | |
static | _buildMonthDayList ($a_month, $a_year, $weekstart) |
Build a month day list. More... | |
static | initJSCalendar () |
Init Javascript Calendar. More... | |
static | getZoneInfoFile ($a_tz) |
static | _getShortTimeZoneList () |
get short timezone list More... | |
static | _isLeapYear ($a_year) |
check if a given year is a leap year More... | |
static | _getMaxDayOfMonth ($a_year, $a_month) |
get max day of month 2008,2 => 29 More... | |
static | calculateFontColor ($a_html_color_code) |
Calculate best font color from html hex color code. More... | |
static | getHourSelection ($a_format) |
Get hour selectio depending on user specific hour format. More... | |
static | initDefaultCalendarByType ($a_type_id, $a_usr_id, $a_title, $a_create=false) |
Init the default calendar for given type and user. More... | |
static | getUserDateFormat ($a_add_time=false, $a_for_parsing=false) |
Parse current user setting into date/time format. More... | |
static | initDateTimePicker () |
static | addDateTimePicker ($a_id, $a_add_time=null, array $a_custom_config=null, $a_id2=null, $a_custom_config2=null, $a_toggle_id=null, $a_subform_id=null) |
Add date time picker to element. More... | |
static | parseDateString ($a_date, $a_add_time=null, $a_use_generic_format=false) |
Parse (incoming) string to date/time object. More... | |
static | parseIncomingDate ($a_value, $a_add_time=null) |
Try to parse incoming value to date object. More... | |
Static Public Attributes | |
static | $init_done |
Static Protected Attributes | |
static | $init_datetimepicker |
Static Private Attributes | |
static | $today = null |
static | $default_calendar = array() |
|
static |
Build a month day list.
public
int | month |
int | year |
int | weekstart (0 => Sunday,1 => Monday) |
Definition at line 139 of file class.ilCalendarUtil.php.
References $i, IL_CAL_FKT_DATE, IL_CAL_FKT_GETDATE, IL_CAL_UNIX, and ilDateList\TYPE_DATE.
Referenced by ilMiniCalendarGUI\addMiniMonth(), ilCalendarBlockGUI\addMiniMonth(), and ilCalendarMonthGUI\addScheduleFilter().
|
static |
build week day list
public
ilDate | a day in a week |
int | weekstart |
Definition at line 109 of file class.ilCalendarUtil.php.
References $i, $start, IL_CAL_DAY, IL_CAL_FKT_GETDATE, and ilDateList\TYPE_DATE.
Referenced by ilObjBookingPoolGUI\buildDatesBySchedule(), ilCalendarViewGUI\getBucketTitle(), ilCalendarHeaderNavigationGUI\getHTML(), ilObjBookingPoolGUI\renderSlots(), and ilCalendarWeekGUI\show().
|
static |
get max day of month 2008,2 => 29
public
int | year |
int | month |
Definition at line 428 of file class.ilCalendarUtil.php.
Referenced by ilCalendarRecurrenceCalculator\applyBYMONTHDAYRules(), ilCalendarRecurrenceCalculator\getMonthWeekDays(), and ilCalendarSchedule\initPeriod().
|
static |
get short timezone list
public
Definition at line 321 of file class.ilCalendarUtil.php.
Referenced by ilSetupGUI\initBasicSettingsForm(), ilObjCalendarSettingsGUI\initFormSettings(), ilPersonalSettingsGUI\initGeneralSettingsForm(), and ilCalendarUserSettingsGUI\initSettingsForm().
|
static |
check if a given year is a leap year
public
int | year |
Definition at line 403 of file class.ilCalendarUtil.php.
Referenced by ilCalendarRecurrenceCalculator\getYearWeekDays().
|
static |
check if a date is today
ilDateTime | $date | date to check |
Definition at line 46 of file class.ilCalendarUtil.php.
References $DIC, $ilUser, ilDateTime\_equals(), IL_CAL_DAY, and IL_CAL_UNIX.
Referenced by ilMiniCalendarGUI\addMiniMonth(), ilCalendarBlockGUI\addMiniMonth(), and ilCalendarMonthGUI\addScheduleFilter().
|
static |
get
public
int | day of week (0 for sunday, 1 for monday) |
bool | short or long day translation |
Definition at line 88 of file class.ilCalendarUtil.php.
Referenced by ilCalendarWeekGUI\addHeaderDate(), ilMiniCalendarGUI\addMiniMonth(), ilCalendarBlockGUI\addMiniMonth(), ilCalendarMonthGUI\addScheduleFilter(), ilRecurrenceInputGUI\buildMonthlyByDaySelection(), ilRecurrenceInputGUI\buildWeekDaySelection(), ilRecurrenceInputGUI\buildYearlyByDaySelection(), ilCalendarDayGUI\executeCommand(), ilSessionStatisticsGUI\exportCSV(), ilBookingReservationsTableGUI\fillRow(), ilBookingReservationsTableGUI\fillRowCSV(), ilBookingReservationsTableGUI\fillRowExcel(), ilSessionStatisticsGUI\getChart(), ilCalendarHeaderNavigationGUI\getHTML(), ilBookingReservationsTableGUI\initFilter(), and ilObjBookingPoolGUI\renderSlots().
|
static |
numeric month to string
public
int | month (1-12) |
bool | short or long month translation |
Definition at line 68 of file class.ilCalendarUtil.php.
Referenced by ilCalendarMonthGUI\addScheduleFilter(), ilRecurrenceInputGUI\buildYearlyByDaySelection(), ilRecurrenceInputGUI\buildYearlyByMonthDaySelection(), ilCalendarDayGUI\executeCommand(), ilDatePresentation\formatDate(), ilObjBlogGUI\renderList(), ilObjBlogGUI\renderNavigationByDate(), ilObjBookingPoolGUI\renderSlots(), and ilWikiStatGUI\viewToolbar().
|
static |
Add date time picker to element.
string | $a_id | |
int | $a_add_time | 1=hh:mm, 2=hh:mm:ss |
array | $a_custom_config | |
string | $a_id2 | |
array | $a_custom_config2 | |
string | $a_toggle_id | |
string | $a_subform_id |
Definition at line 617 of file class.ilCalendarUtil.php.
References $config, $default, $DIC, $ilUser, $language, and $tpl.
Referenced by ilDateTimeInputGUI\render(), and ilDateDurationInputGUI\render().
|
static |
Calculate best font color from html hex color code.
public
string | hex value of color |
Definition at line 447 of file class.ilCalendarUtil.php.
Referenced by ilObjBookingPoolGUI\renderSlots(), ilCalendarWeekGUI\showAppointment(), ilCalendarDayGUI\showAppointment(), ilCalendarMonthGUI\showEvents(), ilCalendarWeekGUI\showFulldayAppointment(), and ilCalendarDayGUI\showFulldayAppointment().
|
static |
Get hour selectio depending on user specific hour format.
int | $a_format |
Definition at line 471 of file class.ilCalendarUtil.php.
References $i, PHPMailer\PHPMailer\$options, ilCalendarSettings\TIME_FORMAT_12, and ilCalendarSettings\TIME_FORMAT_24.
Referenced by ilObjCalendarSettingsGUI\initFormSettings(), and ilCalendarUserSettingsGUI\initSettingsForm().
|
static |
Parse current user setting into date/time format.
int | $a_add_time | 1=hh:mm, 2=hh:mm:ss |
bool | $a_for_parsing |
Definition at line 544 of file class.ilCalendarUtil.php.
References $DIC, $format, $ilUser, ilCalendarSettings\DATE_FORMAT_DMY, ilCalendarSettings\DATE_FORMAT_MDY, ilCalendarSettings\DATE_FORMAT_YMD, and ilCalendarSettings\TIME_FORMAT_24.
Referenced by ilDateTimeInputGUI\render(), and ilDateDurationInputGUI\render().
|
static |
Definition at line 302 of file class.ilCalendarUtil.php.
Referenced by ilCalendarExport\addTimezone().
|
static |
Definition at line 586 of file class.ilCalendarUtil.php.
Referenced by ilExerciseManagementGUI\initIndividualDeadlineModal().
|
static |
Init the default calendar for given type and user.
int | $a_type_id | |
int | $a_usr_id | |
string | $a_title | |
bool | $create |
Definition at line 497 of file class.ilCalendarUtil.php.
References $DIC, $ilDB, $query, $res, $row, ilCalendarCategory\DEFAULT_COLOR, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilConsultationHourUtils\bookAppointment(), ilConsultationHoursGUI\createAppointments(), and ilObjBookingPoolGUI\processBooking().
|
static |
|
static |
Parse (incoming) string to date/time object.
string | $a_date | |
int | $a_add_time | 1=hh:mm, 2=hh:mm:ss |
Definition at line 679 of file class.ilCalendarUtil.php.
References $DIC, $format, $ilUser, IL_CAL_DATE, and IL_CAL_DATETIME.
|
static |
Try to parse incoming value to date object.
mixed | $a_value | |
int | $a_add_time |
Definition at line 732 of file class.ilCalendarUtil.php.
Referenced by ilDateTimeInputGUI\checkInput(), ilDateDurationInputGUI\checkInput(), ilObjBookingPoolGUI\confirmedBookingNumbersObject(), ilSessionStatisticsGUI\importDate(), ilADTDateSearchBridgeSingle\importFromPost(), ilADTDateTimeSearchBridgeSingle\importFromPost(), ilADTDateSearchBridgeRange\importFromPost(), ilADTDateTimeSearchBridgeRange\importFromPost(), ilDateTimeInputGUI\setValueByArray(), ilDateDurationInputGUI\setValueByArray(), ilCourseContentGUI\updateManagedTimings(), and ilCourseContentGUI\updatePersonalTimings().
|
staticprivate |
Definition at line 36 of file class.ilCalendarUtil.php.
|
staticprotected |
Definition at line 38 of file class.ilCalendarUtil.php.
|
static |
Definition at line 37 of file class.ilCalendarUtil.php.
|
staticprivate |
Definition at line 35 of file class.ilCalendarUtil.php.