|
ILIAS
release_7 Revision v7.30-3-g800a261c036
|
Class ilCalendarUtil. More...
Collaboration diagram for ilCalendarUtil:Static Public Member Functions | |
| static | convertDateToUtcDBTimestamp (\ilDateTime $date=null) |
| 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 | getCodeForPicker ($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.
@access public
| int | month |
| int | year |
| int | weekstart (0 => Sunday,1 => Monday) |
Definition at line 154 of file class.ilCalendarUtil.php.
References $i, _getMaxDayOfMonth(), IL_CAL_FKT_DATE, IL_CAL_FKT_GETDATE, IL_CAL_UNIX, and ilDateList\TYPE_DATE.
Referenced by ilMiniCalendarGUI\addMiniMonth(), and ilCalendarBlockGUI\addMiniMonth().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
build week day list
@access public
| ilDate | a day in a week |
| int | weekstart |
Definition at line 124 of file class.ilCalendarUtil.php.
References $i, IL_CAL_DAY, IL_CAL_FKT_GETDATE, and ilDateList\TYPE_DATE.
Referenced by ilCalendarViewGUI\getBucketTitle(), ilCalendarHeaderNavigationGUI\getHTML(), and ilCalendarWeekGUI\show().
Here is the caller graph for this function:
|
static |
get max day of month 2008,2 => 29
@access public
| int | year |
| int | month |
Definition at line 443 of file class.ilCalendarUtil.php.
Referenced by _buildMonthDayList(), ilCalendarRecurrenceCalculator\applyBYMONTHDAYRules(), ilCalendarRecurrenceCalculator\getMonthWeekDays(), and ilCalendarSchedule\initPeriod().
Here is the caller graph for this function:
|
static |
get short timezone list
@access public
Definition at line 336 of file class.ilCalendarUtil.php.
Referenced by ilObjCalendarSettingsGUI\initFormSettings(), ilPersonalSettingsGUI\initGeneralSettingsForm(), and ilCalendarUserSettingsGUI\initSettingsForm().
Here is the caller graph for this function:
|
static |
check if a given year is a leap year
@access public
| int | year |
Definition at line 418 of file class.ilCalendarUtil.php.
Referenced by ilCalendarRecurrenceCalculator\getYearWeekDays().
Here is the caller graph for this function:
|
static |
check if a date is today
| ilDateTime | $date | date to check |
Definition at line 61 of file class.ilCalendarUtil.php.
References $DIC, $ilUser, ilDateTime\_equals(), IL_CAL_DAY, and IL_CAL_UNIX.
Referenced by ilMiniCalendarGUI\addMiniMonth(), and ilCalendarBlockGUI\addMiniMonth().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
get
@access public
| int | day of week (0 for sunday, 1 for monday) |
| bool | short or long day translation |
Definition at line 103 of file class.ilCalendarUtil.php.
Referenced by ilCalendarWeekGUI\addHeaderDate(), ilMiniCalendarGUI\addMiniMonth(), ilCalendarBlockGUI\addMiniMonth(), ilRecurrenceInputGUI\buildMonthlyByDaySelection(), ilRecurrenceInputGUI\buildWeekDaySelection(), ilRecurrenceInputGUI\buildYearlyByDaySelection(), ilSessionStatisticsGUI\exportCSV(), ilBookingReservationsTableGUI\fillRow(), ilBookingReservationsTableGUI\fillRowCSV(), ilBookingReservationsTableGUI\fillRowExcel(), ilSessionStatisticsGUI\getChart(), ilCalendarHeaderNavigationGUI\getHTML(), and ilBookingReservationsTableGUI\initFilter().
Here is the caller graph for this function:
|
static |
numeric month to string
@access public
| int | month (1-12) |
| bool | short or long month translation |
Definition at line 83 of file class.ilCalendarUtil.php.
Referenced by ilRecurrenceInputGUI\buildYearlyByDaySelection(), ilRecurrenceInputGUI\buildYearlyByMonthDaySelection(), ilDatePresentation\formatDate(), ilObjBlogGUI\renderList(), ilObjBlogGUI\renderNavigationByDate(), and ilWikiStatGUI\viewToolbar().
Here is the caller graph for this function:
|
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 630 of file class.ilCalendarUtil.php.
Referenced by ilDateDurationInputGUI\render(), and ilDateTimeInputGUI\render().
Here is the caller graph for this function:
|
static |
Calculate best font color from html hex color code.
@access public
| string | hex value of color |
Definition at line 462 of file class.ilCalendarUtil.php.
Referenced by ilCalendarDayGUI\showAppointment(), ilCalendarWeekGUI\showAppointment(), ilCalendarMonthGUI\showEvents(), ilCalendarDayGUI\showFulldayAppointment(), and ilCalendarWeekGUI\showFulldayAppointment().
Here is the caller graph for this function:
|
static |
| \ilDateTime | null | $date |
Definition at line 44 of file class.ilCalendarUtil.php.
References IL_CAL_DATE, IL_CAL_DATETIME, and ilTimeZone\UTC.
Referenced by ilObjGroup\update(), and ilObjCourse\updateSettings().
Here is the caller graph for this function:
|
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 |
Whether the start of the week in the picker is Sunday or Monday should depend on the user calendar settings (#21666). Unfortunately this is not a direct config of the picker, but is inherent in the locale, so it needs to be shoehorned into there.
0 for Sunday, 1 for Monday
Definition at line 653 of file class.ilCalendarUtil.php.
References $config, $DIC, $ilUser, ilCalendarUserSettings\_getInstanceByUserId(), and initDateTimePicker().
Referenced by ilDateTimeInputGUI\getOnloadCode().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Get hour selectio depending on user specific hour format.
| int | $a_format |
Definition at line 486 of file class.ilCalendarUtil.php.
References $i, ilCalendarSettings\TIME_FORMAT_12, and ilCalendarSettings\TIME_FORMAT_24.
Referenced by ilObjCalendarSettingsGUI\initFormSettings(), and ilCalendarUserSettingsGUI\initSettingsForm().
Here is the caller graph for this function:
|
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 559 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 ilStudyProgrammeMembersTableGUI\getUserDateFormat(), parseDateString(), ilDateDurationInputGUI\render(), and ilDateTimeInputGUI\render().
Here is the caller graph for this function:
|
static |
Definition at line 317 of file class.ilCalendarUtil.php.
Referenced by ilCalendarExport\createTimezones().
Here is the caller graph for this function:
|
static |
Definition at line 601 of file class.ilCalendarUtil.php.
Referenced by getCodeForPicker(), ilPageObjectGUI\initEditing(), and ilExerciseManagementGUI\initIndividualDeadlineModal().
Here is the caller graph for this function:
|
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 512 of file class.ilCalendarUtil.php.
References $DIC, $ilDB, $query, $res, ilCalendarCategory\DEFAULT_COLOR, and ilDBConstants\FETCHMODE_OBJECT.
Referenced by ilConsultationHourUtils\bookAppointment(), ilConsultationHoursGUI\createAppointments(), and ilBookingProcessGUI\processBooking().
Here is the caller graph for this function:
|
static |
Init Javascript Calendar.
Definition at line 232 of file class.ilCalendarUtil.php.
|
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 729 of file class.ilCalendarUtil.php.
References $DIC, $format, $ilUser, getUserDateFormat(), IL_CAL_DATE, and IL_CAL_DATETIME.
Referenced by parseIncomingDate().
Here is the call graph for this function:
Here is the caller graph for this function:
|
static |
Try to parse incoming value to date object.
| mixed | $a_value | |
| int | $a_add_time |
Definition at line 781 of file class.ilCalendarUtil.php.
References parseDateString().
Referenced by ilDateDurationInputGUI\checkInput(), ilDateTimeInputGUI\checkInput(), ilBookingProcessGUI\confirmedBookingNumbers(), ilSessionStatisticsGUI\importDate(), ilADTDateSearchBridgeRange\importFromPost(), ilADTDateSearchBridgeSingle\importFromPost(), ilADTDateTimeSearchBridgeRange\importFromPost(), ilADTDateTimeSearchBridgeSingle\importFromPost(), ilDateDurationInputGUI\setValueByArray(), ilDateTimeInputGUI\setValueByArray(), ilCourseContentGUI\updateManagedTimings(), and ilCourseContentGUI\updatePersonalTimings().
Here is the call graph for this function:
Here is the caller graph for this function:
|
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.