ILIAS
release_8 Revision v8.19
|
Class ilCalendarUtil. More...
Static Public Member Functions | |
static | convertDateToUtcDBTimestamp (\ilDateTime $date=null) |
static | _isToday (ilDateTime $date) |
static | _numericMonthToString (int $a_month, bool $a_long=true) |
numeric month to string More... | |
static | _numericDayToString (int $a_day, bool $a_long=true) |
static | _buildWeekDayList (ilDate $a_day, int $a_weekstart) |
build week day list public More... | |
static | _buildMonthDayList (int $a_month, int $a_year, int $weekstart) |
Build a month day list. More... | |
static | initJSCalendar () |
static | getZoneInfoFile ($a_tz) |
static | _getShortTimeZoneList () |
get short timezone list More... | |
static | _isLeapYear (int $a_year) |
check if a given year is a leap year More... | |
static | _getMaxDayOfMonth (int $a_year, int $a_month) |
get max day of month 2008,2 => 29 More... | |
static | calculateFontColor (string $a_html_color_code) |
Calculate best font color from html hex color code. More... | |
static | getHourSelection (int $a_format) |
Get hour selection depending on user specific hour format. More... | |
static | initDefaultCalendarByType (int $a_type_id, int $a_usr_id, string $a_title, bool $a_create=false) |
Init the default calendar for given type and user. More... | |
static | getUserDateFormat (int $a_add_time=0, bool $a_for_parsing=false) |
Parse current user setting into date/time format. More... | |
static | initDateTimePicker () |
static | addDateTimePicker (string $a_id, ?int $a_add_time=null, ?array $a_custom_config=null, ?string $a_id2=null, ?array $a_custom_config2=null, ?string $a_toggle_id=null, ?string $a_subform_id=null) |
Add date time picker to element. More... | |
static | getCodeForPicker (string $a_id, ?int $a_add_time=null, ?array $a_custom_config=null, ?string $a_id2=null, ?array $a_custom_config2=null, ?string $a_toggle_id=null, ?string $a_subform_id=null) |
Add date time picker to element. More... | |
static | parseDateString (string $a_date, bool $a_add_time=false, bool $a_use_generic_format=false) |
Parse (incoming) string to date/time object. More... | |
static | parseIncomingDate ($a_value, bool $a_add_time=false) |
Try to parse incoming value to date object. More... | |
Static Public Attributes | |
static string | $init_done |
Static Protected Attributes | |
static bool | $init_datetimepicker = false |
Static Private Attributes | |
static ilDateTime | $today = null |
static array | $default_calendar = array() |
Class ilCalendarUtil.
Definition at line 28 of file class.ilCalendarUtil.php.
|
static |
Build a month day list.
int | month |
int | year |
int | weekstart (0 => Sunday,1 => Monday) |
Definition at line 119 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\show().
|
static |
build week day list public
ilDate | a day in a week |
int | weekstart |
Definition at line 93 of file class.ilCalendarUtil.php.
References $i, ilDate\get(), IL_CAL_DAY, IL_CAL_FKT_GETDATE, and ilDateList\TYPE_DATE.
Referenced by ilBookingProcessGUI\book(), ilCalendarViewGUI\getBucketTitle(), ilCalendarHeaderNavigationGUI\getHTML(), and ilCalendarWeekGUI\show().
|
static |
get max day of month 2008,2 => 29
Definition at line 386 of file class.ilCalendarUtil.php.
Referenced by ilCalendarRecurrenceCalculator\applyBYMONTHDAYRules(), ilCalendarRecurrenceCalculator\getMonthWeekDays(), and ilCalendarSchedule\initPeriod().
|
static |
get short timezone list
Definition at line 289 of file class.ilCalendarUtil.php.
Referenced by ilObjCalendarSettingsGUI\initFormSettings(), ilPersonalSettingsGUI\initGeneralSettingsForm(), and ilCalendarUserSettingsGUI\initSettingsForm().
|
static |
check if a given year is a leap year
Definition at line 367 of file class.ilCalendarUtil.php.
Referenced by ilCalendarRecurrenceCalculator\getYearWeekDays().
|
static |
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\show().
|
static |
int | day of week (0 for sunday, 1 for monday) |
bool | short or long day translation |
Definition at line 75 of file class.ilCalendarUtil.php.
Referenced by ilCalendarWeekGUI\addHeaderDate(), ilMiniCalendarGUI\addMiniMonth(), ilCalendarBlockGUI\addMiniMonth(), ilBookingProcessGUI\book(), ilRecurrenceInputGUI\buildMonthlyByDaySelection(), ilRecurrenceInputGUI\buildWeekDaySelection(), ilRecurrenceInputGUI\buildYearlyByDaySelection(), ilSessionStatisticsGUI\exportCSV(), ilBookingReservationsTableGUI\fillRow(), ilBookingReservationsTableGUI\fillRowCSV(), ilBookingReservationsTableGUI\fillRowExcel(), ilSessionStatisticsGUI\getChart(), ilCalendarHeaderNavigationGUI\getHTML(), ilBookingReservationsTableGUI\initFilter(), ilCalendarDayGUI\show(), and ilCalendarMonthGUI\show().
|
static |
numeric month to string
int | month (1-12) |
bool | short or long month translation |
Definition at line 62 of file class.ilCalendarUtil.php.
Referenced by ilBookingProcessGUI\book(), ilRecurrenceInputGUI\buildYearlyByDaySelection(), ilRecurrenceInputGUI\buildYearlyByMonthDaySelection(), ilDatePresentation\formatDate(), ilObjBlogGUI\renderList(), ilObjBlogGUI\renderNavigationByDate(), ilCalendarDayGUI\show(), ilCalendarMonthGUI\show(), 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 545 of file class.ilCalendarUtil.php.
Referenced by ilDateTimeInputGUI\render(), and ilDateDurationInputGUI\render().
|
static |
Calculate best font color from html hex color code.
string | hex value of color |
Definition at line 399 of file class.ilCalendarUtil.php.
Referenced by ilBookingProcessGUI\book(), ilCalendarWeekGUI\showAppointment(), ilCalendarDayGUI\showAppointment(), ilCalendarMonthGUI\showEvents(), ilCalendarWeekGUI\showFulldayAppointment(), and ilCalendarDayGUI\showFulldayAppointment().
|
static |
Definition at line 35 of file class.ilCalendarUtil.php.
References IL_CAL_DATE, IL_CAL_DATETIME, and ilTimeZone\UTC.
Referenced by ilObjGroup\update(), and ilObjCourse\updateSettings().
|
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 581 of file class.ilCalendarUtil.php.
References $config, $DIC, $ilUser, and ilCalendarUserSettings\_getInstanceByUserId().
Referenced by ilDateTimeInputGUI\getOnloadCode().
|
static |
Get hour selection depending on user specific hour format.
Definition at line 415 of file class.ilCalendarUtil.php.
References $i, 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 479 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 ilStudyProgrammeUserTable\getUserDateFormat(), ilDateTimeInputGUI\render(), ilDateDurationInputGUI\render(), ilObjEmployeeTalkGUI\sendNotification(), ilEmployeeTalkAppointmentGUI\sendNotification(), ilObjEmployeeTalkSeriesGUI\sendNotification(), and ilObjEmployeeTalkGUI\sendUpdateNotification().
|
static |
Definition at line 276 of file class.ilCalendarUtil.php.
Referenced by ilCalendarExport\createTimezones().
|
static |
Definition at line 520 of file class.ilCalendarUtil.php.
Referenced by ilPageObjectGUI\initEditing(), and ilExerciseManagementGUI\initIndividualDeadlineModal().
|
static |
Init the default calendar for given type and user.
Definition at line 437 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().
|
static |
Definition at line 191 of file class.ilCalendarUtil.php.
References $DIC, $lng, and $tpl.
|
static |
Parse (incoming) string to date/time object.
string | $a_date | |
bool | $a_add_time | 1=hh:mm, 2=hh:mm:ss |
bool | $a_use_generic_format |
ilDateTimeException |
Definition at line 664 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.
string | ilDateTime | $a_value | |
int | $a_add_time |
Definition at line 716 of file class.ilCalendarUtil.php.
Referenced by ilDateTimeInputGUI\checkInput(), ilDclGenericMultiInputGUI\checkInput(), ilDateDurationInputGUI\checkInput(), ilBookingProcessGUI\confirmedBookingNumbers(), ilAdvancedMDFieldDefinitionDate\getLuceneSearchString(), ilAdvancedMDFieldDefinitionDateTime\getLuceneSearchString(), ilSessionStatisticsGUI\importDate(), ilADTDateSearchBridgeSingle\importFromPost(), ilADTDateTimeSearchBridgeSingle\importFromPost(), ilADTDateSearchBridgeRange\importFromPost(), ilADTDateTimeSearchBridgeRange\importFromPost(), ilDclGenericMultiInputGUI\setValue(), ilDateTimeInputGUI\setValueByArray(), ilDateDurationInputGUI\setValueByArray(), ilCourseContentGUI\updateManagedTimings(), and ilCourseContentGUI\updatePersonalTimings().
|
staticprivate |
Definition at line 31 of file class.ilCalendarUtil.php.
|
staticprotected |
Definition at line 33 of file class.ilCalendarUtil.php.
|
static |
Definition at line 32 of file class.ilCalendarUtil.php.
|
staticprivate |
Definition at line 30 of file class.ilCalendarUtil.php.