ILIAS  release_5-0 Revision 5.0.0-1144-gc4397b1f870
All Data Structures Namespaces Files Functions Variables Modules Pages
ilCalendarUtil Class Reference

Class ilCalendarUtil. More...

+ Collaboration diagram for ilCalendarUtil:

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 Public Attributes

static $init_done
 

Static Private Attributes

static $today = null
 
static $default_calendar = array()
 

Detailed Description

Class ilCalendarUtil.

Author
Helmut Schottmüller helmu.nosp@m.t.sc.nosp@m.hottm.nosp@m.uell.nosp@m.er@ma.nosp@m.c.co.nosp@m.m
Version
$Id$

Definition at line 33 of file class.ilCalendarUtil.php.

Member Function Documentation

◆ _buildMonthDayList()

static ilCalendarUtil::_buildMonthDayList (   $a_month,
  $a_year,
  $weekstart 
)
static

Build a month day list.

public

Parameters
intmonth
intyear
intweekstart (0 => Sunday,1 => Monday)
Returns
ilDateList

Definition at line 135 of file class.ilCalendarUtil.php.

References IL_CAL_FKT_DATE, IL_CAL_FKT_GETDATE, IL_CAL_UNIX, and ilDateList\TYPE_DATE.

Referenced by ilMiniCalendarGUI\addMiniMonth(), ilCalendarBlockGUI\addMiniMonth(), and ilCalendarMonthGUI\show().

136  {
137  include_once('Services/Calendar/classes/class.ilDateList.php');
138  $day_list = new ilDateList(ilDateList::TYPE_DATE);
139 
140  $prev_month = ($a_month == 1) ? 12 : $a_month - 1;
141  $prev_year = ($prev_month == 12) ? $a_year - 1 : $a_year;
142  $next_month = $a_month == 12 ? 1 : $a_month + 1;
143  $next_year = $a_month == 12 ? $a_year + 1 : $a_year;
144 
145  $days_in_month = self::_getMaxDayOfMonth($a_year,$a_month);
146  $days_in_prev_month = self::_getMaxDayOfMonth($a_year,$prev_month);
147 
148  $week_day['year'] = $a_year;
149  $week_day['mon'] = $a_month;
150  $week_day['mday'] = 1;
151  $week_day['hours'] = 0;
152  $week_day['minutes'] = 0;
153  $week_day = new ilDate($week_day,IL_CAL_FKT_GETDATE);
154 
155  $weekday = $week_day->get(IL_CAL_FKT_DATE,'w');
156  $first_day_offset = (($weekday - $weekstart) < 0) ? 6 : $weekday - $weekstart;
157 
158 
159  for($i = 0;$i < 42;$i++)
160  {
161 
162  if($i < $first_day_offset)
163  {
164  $day = $days_in_prev_month - $first_day_offset + $i + 1;
165 
166  $day_list->add(new ilDate(gmmktime(0,0,0,$prev_month,
167  $days_in_prev_month - $first_day_offset + $i + 1,
168  $prev_year),
169  IL_CAL_UNIX));
170  }
171  elseif($i < $days_in_month + $first_day_offset)
172  {
173  $day = $i - $first_day_offset + 1;
174 
175 
176  $day_list->add(new ilDate(gmmktime(0,0,0,$a_month,
177  $i - $first_day_offset + 1,
178  $a_year),
179  IL_CAL_UNIX));
180  }
181  else
182  {
183  $day = $i - $days_in_month - $first_day_offset + 1;
184  $day_list->add(new ilDate(gmmktime(0,0,0,$next_month,
185  $i - $days_in_month - $first_day_offset + 1,
186  $next_year),
187  IL_CAL_UNIX));
188  }
189  if($i == 34 and ($day < 15 or $day == $days_in_month))
190  {
191  break;
192  }
193  }
194  return $day_list;
195  }
const IL_CAL_UNIX
Class for single dates.
List of dates.
const IL_CAL_FKT_DATE
const IL_CAL_FKT_GETDATE
+ Here is the caller graph for this function:

◆ _buildWeekDayList()

static ilCalendarUtil::_buildWeekDayList (   $a_day,
  $a_weekstart 
)
static

build week day list

public

Parameters
ilDatea day in a week
intweekstart
Returns
ilDateList

Definition at line 103 of file class.ilCalendarUtil.php.

References IL_CAL_DAY, IL_CAL_FKT_GETDATE, and ilDateList\TYPE_DATE.

Referenced by ilObjBookingPoolGUI\buildDatesBySchedule(), ilObjBookingPoolGUI\renderSlots(), and ilCalendarWeekGUI\show().

104  {
105  include_once('Services/Calendar/classes/class.ilDateList.php');
106  $day_list = new ilDateList(ilDateList::TYPE_DATE);
107 
108  $start = clone $a_day;
109  $start_info = $start->get(IL_CAL_FKT_GETDATE,'','UTC');
110  $day_diff = $a_weekstart - $start_info['isoday'];
111  if($day_diff == 7)
112  {
113  $day_diff = 0;
114  }
115  $start->increment(IL_CAL_DAY,$day_diff);
116  $day_list->add($start);
117  for($i = 1; $i < 7;$i++)
118  {
119  $start->increment(IL_CAL_DAY,1);
120  $day_list->add($start);
121  }
122  return $day_list;
123  }
const IL_CAL_DAY
List of dates.
const IL_CAL_FKT_GETDATE
+ Here is the caller graph for this function:

◆ _getMaxDayOfMonth()

static ilCalendarUtil::_getMaxDayOfMonth (   $a_year,
  $a_month 
)
static

get max day of month 2008,2 => 29

public

Parameters
intyear
intmonth
Returns

Definition at line 410 of file class.ilCalendarUtil.php.

Referenced by ilCalendarRecurrenceCalculator\applyBYMONTHDAYRules(), ilCalendarRecurrenceCalculator\getMonthWeekDays(), and ilCalendarSchedule\initPeriod().

411  {
412  if(@function_exists('cal_days_in_month'))
413  {
414  return cal_days_in_month(CAL_GREGORIAN,$a_month,$a_year);
415  }
416  $months = array(0,31,
417  self::_isLeapYear($a_year) ? 29 : 28,
418  31,30,31,30,31,31,30,31,30,31);
419  return $months[(int) $a_month];
420  }
+ Here is the caller graph for this function:

◆ _getShortTimeZoneList()

static ilCalendarUtil::_getShortTimeZoneList ( )
static

get short timezone list

public

Parameters

Definition at line 300 of file class.ilCalendarUtil.php.

Referenced by ilOpenIdAttributeToUser\create(), ilSetupGUI\initBasicSettingsForm(), ilObjCalendarSettingsGUI\initFormSettings(), ilPersonalSettingsGUI\initGeneralSettingsForm(), and ilCalendarUserSettingsGUI\initSettingsForm().

301  {
302  return array(
303  'Pacific/Samoa' => 'GMT-11: Midway Islands, Samoa',
304  'US/Hawaii' => 'GMT-10:00: Hawaii, Polynesia',
305  'US/Alaska' => 'GMT-9:00: Alaska',
306  'America/Los_Angeles' => 'GMT-8:00: Tijuana, Los Angeles, Seattle, Vancouver',
307  'US/Arizona' => 'GMT-7:00: Arizona',
308  'America/Chihuahua' => 'GMT-7:00: Chihuahua, La Paz, Mazatlan',
309  'America/Denver' => 'GMT-7:00: Arizona, Denver, Salt Lake City, Calgary',
310  'America/Chicago' => 'GMT-6:00: Chicago, Dallas, Kansas City, Winnipeg',
311  'America/Monterrey' => 'GMT-6:00: Guadalajara, Mexico City, Monterrey',
312  'Canada/Saskatchewan' => 'GMT-6:00: Saskatchewan',
313  'US/Central' => 'GMT-6:00: Central America',
314  'America/Bogota' => 'GMT-5:00: Bogota, Lima, Quito',
315  'US/East-Indiana' => 'GMT-5:00: East-Indiana',
316  'America/New_York' => 'GMT-5:00: New York, Miami, Atlanta, Detroit, Toronto',
317  'Canada/Atlantic' => 'GMT-4:00: Atlantic (Canada)',
318  'America/La_Paz' => 'GMT-4:00: Carcas, La Paz',
319  'America/Santiago' => 'GMT-4:00: Santiago',
320  'Canada/Newfoundland' => 'GMT-3:00: Newfoundland',
321  'Brazil/East' => 'GMT-3:00: Sao Paulo',
322  'America/Argentina/Buenos_Aires' => 'GMT-3:00: Buenes Aires, Georgtown',
323  'Etc/GMT+3' => 'GMT-3:00: Greenland, Uruguay, Surinam',
324  'Atlantic/Cape_Verde' => 'GMT-2:00: Cape Verde, Greenland, South Georgia',
325  'Atlantic/Azores' => 'GMT-1:00: Azores',
326  'Africa/Casablanca' => 'GMT+0:00: Casablanca, Monrovia',
327  'Europe/London' => 'GMT+0:00: Dublin, Edinburgh, Lisbon, London',
328  'Europe/Berlin' => 'GMT+1:00: Amsterdam, Berlin, Bern, Rome, Stockholm, Vienna',
329  'Europe/Belgrade' => 'GMT+1:00: Belgrade, Bratislava, Budapest, Ljubljana, Prague',
330  'Europe/Paris' => 'GMT+1:00: Brussels, Copenhagen, Paris, Madrid',
331  'Europe/Sarajevo' => 'GMT+1:00: Sarajevo, Skopje, Warsaw, Zagreb',
332  'Africa/Lagos' => 'GMT+1:00: West-Central Africa',
333  'Europe/Athens' => 'GMT+2:00: Athens, Beirut, Istanbul, Minsk',
334  'Europe/Bucharest' => 'GMT+2:00: Bucharest',
335  'Africa/Harare' => 'GMT+2:00: Harare, Pratoria',
336  'Europe/Helsinki' => 'GMT+2:00: Helsinki, Kiev, Riga, Sofia, Tallinn, Vilnius',
337  'Asia/Jerusalem' => 'GMT+2:00: Jerusalem',
338  'Africa/Cairo' => 'GMT+2:00: Cairo',
339  'Asia/Baghdad' => 'GMT+3:00: Baghdad',
340  'Asia/Kuwait' => 'GMT+3:00: Kuwait, Riyadh',
341  'Europe/Moscow' => 'GMT+3:00: Moscow, Saint Petersburg',
342  'Africa/Nairobi' => 'GMT+3:00: Nairobi',
343  'Asia/Tehran' => 'GMT+3:30: Tehran',
344  'Asia/Muscat' => 'GMT+4:00: Abu Dhabi, Muscat',
345  'Asia/Baku' => 'GMT+4:00: Baku, Tbilisi, Erivan',
346  'Asia/Kabul' => 'GMT+4:00: Kabul',
347  'Asia/Karachi' => 'GMT+5:00: Islamabad, Karachi, Taschkent',
348  'Asia/Yekaterinburg' => 'GMT+5:00: Yekaterinburg',
349  'Asia/Calcutta' => 'GMT+5:30: New Dehli',
350  'Asia/Katmandu' => 'GMT+5:45: Katmandu',
351  'Asia/Novosibirsk' => 'GMT+6:00: Almaty, Novosibirsk',
352  'Asia/Dhaka' => 'GMT+6:00: Astana, Dhaka',
353  'Asia/Rangoon' => 'GMT+6:00: Sri Jayawardenepura, Rangoon',
354  'Asia/Jakarta' => 'GMT+7:00: Bangkok, Hanoi, Jakarta',
355  'Asia/Krasnoyarsk' => 'GMT+7:00: Krasnoyarsk',
356  'Asia/Irkutsk' => 'GMT+8:00: Irkutsk, Ulan Bator',
357  'Asia/Singapore' => 'GMT+8:00: Kuala Lumpour, Singapore',
358  'Asia/Hong_Kong' => 'GMT+8:00: Beijing, Chongqing, Hong kong, Urumchi',
359  'Australia/Perth' => 'GMT+8:00: Perth',
360  'Asia/Taipei' => 'GMT+8:00: Taipei',
361  'Asia/Yakutsk' => 'GMT+9:00: Yakutsk',
362  'Asia/Tokyo' => 'GMT+9:00: Osaka, Sapporo, Tokyo',
363  'Asia/Seoul' => 'GMT+9:00: Seoul, Darwin, Adelaide',
364  'Australia/Brisbane' => 'GMT+10:00: Brisbane',
365  'Australia/Sydney' => 'GMT+10:00: Canberra, Melbourne, Sydney',
366  'Pacific/Guam' => 'GMT+10:00: Guam, Port Moresby',
367  'Australia/Hobart' => 'GMT+10:00: Hobart',
368  'Asia/Vladivostok' => 'GMT+10:00: Vladivostok',
369  'Asia/Magadan' => 'GMT+11:00: Salomon Islands, New Caledonia, Magadan',
370  'Pacific/Auckland' => 'GMT+12:00: Auckland, Wellington',
371  'Pacific/Fiji' => 'GMT+12:00: Fiji, Kamchatka, Marshall-Islands');
372  }
+ Here is the caller graph for this function:

◆ _isLeapYear()

static ilCalendarUtil::_isLeapYear (   $a_year)
static

check if a given year is a leap year

public

Parameters
intyear
Returns
bool

Definition at line 382 of file class.ilCalendarUtil.php.

Referenced by ilCalendarRecurrenceCalculator\getYearWeekDays().

383  {
384  $is_leap = false;
385 
386  if($a_year % 4 == 0)
387  {
388  $is_leap = true;
389  if($a_year % 100 == 0)
390  {
391  $is_leap = false;
392  if($a_year % 400)
393  {
394  return true;
395  }
396  }
397  }
398  return $is_leap;
399  }
+ Here is the caller graph for this function:

◆ _isToday()

static ilCalendarUtil::_isToday (   $date)
static

check if a date is today

Parameters
ilDateTime$datedate to check
Returns
bool

Definition at line 45 of file class.ilCalendarUtil.php.

References $ilUser, ilDateTime\_equals(), IL_CAL_DAY, and IL_CAL_UNIX.

Referenced by ilMiniCalendarGUI\addMiniMonth(), ilCalendarBlockGUI\addMiniMonth(), and ilCalendarMonthGUI\show().

46  {
47  global $ilUser;
48 
49 
50  if(!is_object(self::$today))
51  {
52  self::$today = new ilDateTime(time(),IL_CAL_UNIX,$ilUser->getTimeZone());
53  }
54  return ilDateTime::_equals(self::$today,$date,IL_CAL_DAY,$ilUser->getTimeZone());
55  }
const IL_CAL_UNIX
const IL_CAL_DAY
static _equals(ilDateTime $start, ilDateTime $end, $a_compare_field='', $a_tz='')
Check if two date are equal.
Date and time handling
global $ilUser
Definition: imgupload.php:15
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ _numericDayToString()

static ilCalendarUtil::_numericDayToString (   $a_day,
  $a_long = true 
)
static

get

public

Parameters
intday of week (0 for sunday, 1 for monday)
boolshort or long day translation

Definition at line 84 of file class.ilCalendarUtil.php.

References $lng.

Referenced by ilMiniCalendarGUI\addMiniMonth(), ilCalendarBlockGUI\addMiniMonth(), ilRecurrenceInputGUI\buildMonthlyByDaySelection(), ilRecurrenceInputGUI\buildWeekDaySelection(), ilRecurrenceInputGUI\buildYearlyByDaySelection(), ilSessionStatisticsGUI\exportCSV(), ilBookingReservationsTableGUI\fillRow(), ilBookingReservationsTableGUI\fillRowCSV(), ilBookingReservationsTableGUI\fillRowExcel(), ilSessionStatisticsGUI\getChart(), ilCalendarHeaderNavigationGUI\getHTML(), ilBookingReservationsTableGUI\initFilter(), ilObjBookingPoolGUI\renderSlots(), ilCalendarDayGUI\show(), ilCalendarWeekGUI\show(), and ilCalendarMonthGUI\show().

85  {
86  global $lng;
87 
88  $lng->loadLanguageModule('dateplaner');
89  static $days = array('Su','Mo','Tu','We','Th','Fr','Sa','Su');
90 
91  return $a_long ? $lng->txt($days[$a_day].'_long') : $lng->txt($days[$a_day].'_short');
92  }
global $lng
Definition: privfeed.php:40
+ Here is the caller graph for this function:

◆ _numericMonthToString()

static ilCalendarUtil::_numericMonthToString (   $a_month,
  $a_long = true 
)
static

numeric month to string

public

Parameters
intmonth (1-12)
boolshort or long month translation

Definition at line 66 of file class.ilCalendarUtil.php.

References $lng.

Referenced by ilRecurrenceInputGUI\buildYearlyByDaySelection(), ilRecurrenceInputGUI\buildYearlyByMonthDaySelection(), ilDatePresentation\formatDate(), ilObjBlogGUI\renderList(), ilObjBlogGUI\renderNavigationByDate(), ilObjBookingPoolGUI\renderSlots(), ilCalendarDayGUI\show(), ilCalendarWeekGUI\show(), and ilWikiStatGUI\viewToolbar().

67  {
68  global $lng;
69 
70  $month = $a_month < 10 ? '0'.$a_month : $a_month;
71 
72  return $a_long ? $lng->txt('month_'.$month.'_long') : $lng->txt('month_'.$month.'_short');
73  }
global $lng
Definition: privfeed.php:40
+ Here is the caller graph for this function:

◆ calculateFontColor()

static ilCalendarUtil::calculateFontColor (   $a_html_color_code)
static

Calculate best font color from html hex color code.

public

Parameters
stringhex value of color
Returns
string #ffffff or #000000

Definition at line 430 of file class.ilCalendarUtil.php.

Referenced by ilObjBookingPoolGUI\renderSlots(), ilCalendarDayGUI\showAppointment(), ilCalendarMonthGUI\showEvents(), ilCalendarDayGUI\showFulldayAppointment(), and ilCalendarWeekGUI\showFulldayAppointment().

431  {
432  if(strpos($a_html_color_code,'#') !== 0 or strlen($a_html_color_code) != 7)
433  {
434  return '#000000';
435  }
436 
437  // http://en.wikipedia.org/wiki/Luminance_(relative)
438  $lum = round(hexdec(substr($a_html_color_code, 1, 2))*0.2126+
439  hexdec(substr($a_html_color_code, 3, 2))*0.7152+
440  hexdec(substr($a_html_color_code, 5, 2))*0.0722);
441 
442  return ($lum <= 128) ? "#FFFFFF" : "#000000";
443 
444  /*
445  $hex = str_replace('#','0x',$a_html_color_code);
446  return hexdec($hex) > 8000000 ? '#000000' : '#FFFFFF';
447  */
448  }
+ Here is the caller graph for this function:

◆ getHourSelection()

static ilCalendarUtil::getHourSelection (   $a_format)
static

Get hour selectio depending on user specific hour format.

Returns
Parameters
int$a_format

Definition at line 455 of file class.ilCalendarUtil.php.

References $options, ilCalendarSettings\TIME_FORMAT_12, and ilCalendarSettings\TIME_FORMAT_24.

Referenced by ilObjCalendarSettingsGUI\initFormSettings(), and ilCalendarUserSettingsGUI\initSettingsForm().

456  {
457  switch($a_format)
458  {
460  for($i = 0; $i < 24; $i++)
461  {
462  $options[$i] = sprintf('%02d:00',$i);
463  }
464  break;
465 
467  for($i = 0; $i < 24; $i++)
468  {
469  $options[$i] = date('h a',mktime($i,0,0,1,1,2000));
470  }
471  break;
472  }
473  return $options ? $options : array();
474 
475  }
if(!is_array($argv)) $options
+ Here is the caller graph for this function:

◆ getZoneInfoFile()

static ilCalendarUtil::getZoneInfoFile (   $a_tz)
static

Definition at line 280 of file class.ilCalendarUtil.php.

Referenced by ilCalendarExport\addTimezone().

281  {
282  if(!array_key_exists($a_tz, self::_getShortTimeZoneList()))
283  {
284  return '';
285  }
286  $timezone_filename = str_replace('/', '_', $a_tz);
287  $timezone_filename .= '.ics';
288  return './Services/Calendar/zoneinfo/'.$timezone_filename;
289  }
+ Here is the caller graph for this function:

◆ initDefaultCalendarByType()

static ilCalendarUtil::initDefaultCalendarByType (   $a_type_id,
  $a_usr_id,
  $a_title,
  $a_create = false 
)
static

Init the default calendar for given type and user.

Parameters
int$a_type_id
int$a_usr_id
string$a_title
bool$create
Returns

Definition at line 485 of file class.ilCalendarUtil.php.

References $ilDB, $query, $res, $row, DB_FETCHMODE_OBJECT, and ilCalendarCategory\DEFAULT_COLOR.

Referenced by ilConsultationHourUtils\bookAppointment(), ilConsultationHoursGUI\createAppointments(), and ilObjBookingPoolGUI\processBooking().

486  {
487  global $ilDB;
488 
489  if(isset(self::$default_calendar[$a_usr_id]) and isset(self::$default_calendar[$a_usr_id][$a_type_id]))
490  {
491  return self::$default_calendar[$a_usr_id][$a_type_id];
492  }
493 
494  include_once './Services/Calendar/classes/class.ilCalendarCategory.php';
495 
496  $query = "SELECT cat_id FROM cal_categories ".
497  "WHERE obj_id = ".$ilDB->quote($a_usr_id,'integer')." ".
498  "AND type = ".$ilDB->quote($a_type_id,'integer');
499  $res = $ilDB->query($query);
500  while($row = $res->fetchRow(DB_FETCHMODE_OBJECT))
501  {
502  return self::$default_calendar[$a_usr_id][$a_type_id] = new ilCalendarCategory($row->cat_id);
503  }
504 
505  if(!$a_create)
506  {
507  return null;
508  }
509 
510  // Create default calendar
511  self::$default_calendar[$a_usr_id][$a_type_id] = new ilCalendarCategory();
512  self::$default_calendar[$a_usr_id][$a_type_id]->setType($a_type_id);
513  self::$default_calendar[$a_usr_id][$a_type_id]->setColor(ilCalendarCategory::DEFAULT_COLOR);
514  self::$default_calendar[$a_usr_id][$a_type_id]->setTitle($a_title);
515  self::$default_calendar[$a_usr_id][$a_type_id]->setObjId($a_usr_id);
516  self::$default_calendar[$a_usr_id][$a_type_id]->add();
517 
518  return self::$default_calendar[$a_usr_id][$a_type_id];
519  }
Stores calendar categories.
const DB_FETCHMODE_OBJECT
Definition: class.ilDB.php:11
global $ilDB
+ Here is the caller graph for this function:

◆ initJSCalendar()

static ilCalendarUtil::initJSCalendar ( )
static

Init Javascript Calendar.

Definition at line 200 of file class.ilCalendarUtil.php.

References $lng, and $tpl.

Referenced by ilBirthdayInputGUI\render(), ilDateTimeInputGUI\render(), and ilDateDurationInputGUI\render().

201  {
202  global $tpl, $lng;
203 
204  if (self::$init_done == "done")
205  {
206  return;
207  }
208 
209  $lng->loadLanguageModule("jscalendar");
210  $tpl->addBlockFile("CALENDAR_LANG_JAVASCRIPT", "calendar_javascript", "tpl.calendar.html",
211  "Services/Calendar");
212  $tpl->setCurrentBlock("calendar_javascript");
213  $tpl->setVariable("FULL_SUNDAY", $lng->txt("l_su"));
214  $tpl->setVariable("FULL_MONDAY", $lng->txt("l_mo"));
215  $tpl->setVariable("FULL_TUESDAY", $lng->txt("l_tu"));
216  $tpl->setVariable("FULL_WEDNESDAY", $lng->txt("l_we"));
217  $tpl->setVariable("FULL_THURSDAY", $lng->txt("l_th"));
218  $tpl->setVariable("FULL_FRIDAY", $lng->txt("l_fr"));
219  $tpl->setVariable("FULL_SATURDAY", $lng->txt("l_sa"));
220  $tpl->setVariable("SHORT_SUNDAY", $lng->txt("s_su"));
221  $tpl->setVariable("SHORT_MONDAY", $lng->txt("s_mo"));
222  $tpl->setVariable("SHORT_TUESDAY", $lng->txt("s_tu"));
223  $tpl->setVariable("SHORT_WEDNESDAY", $lng->txt("s_we"));
224  $tpl->setVariable("SHORT_THURSDAY", $lng->txt("s_th"));
225  $tpl->setVariable("SHORT_FRIDAY", $lng->txt("s_fr"));
226  $tpl->setVariable("SHORT_SATURDAY", $lng->txt("s_sa"));
227  $tpl->setVariable("FULL_JANUARY", $lng->txt("l_01"));
228  $tpl->setVariable("FULL_FEBRUARY", $lng->txt("l_02"));
229  $tpl->setVariable("FULL_MARCH", $lng->txt("l_03"));
230  $tpl->setVariable("FULL_APRIL", $lng->txt("l_04"));
231  $tpl->setVariable("FULL_MAY", $lng->txt("l_05"));
232  $tpl->setVariable("FULL_JUNE", $lng->txt("l_06"));
233  $tpl->setVariable("FULL_JULY", $lng->txt("l_07"));
234  $tpl->setVariable("FULL_AUGUST", $lng->txt("l_08"));
235  $tpl->setVariable("FULL_SEPTEMBER", $lng->txt("l_09"));
236  $tpl->setVariable("FULL_OCTOBER", $lng->txt("l_10"));
237  $tpl->setVariable("FULL_NOVEMBER", $lng->txt("l_11"));
238  $tpl->setVariable("FULL_DECEMBER", $lng->txt("l_12"));
239  $tpl->setVariable("SHORT_JANUARY", $lng->txt("s_01"));
240  $tpl->setVariable("SHORT_FEBRUARY", $lng->txt("s_02"));
241  $tpl->setVariable("SHORT_MARCH", $lng->txt("s_03"));
242  $tpl->setVariable("SHORT_APRIL", $lng->txt("s_04"));
243  $tpl->setVariable("SHORT_MAY", $lng->txt("s_05"));
244  $tpl->setVariable("SHORT_JUNE", $lng->txt("s_06"));
245  $tpl->setVariable("SHORT_JULY", $lng->txt("s_07"));
246  $tpl->setVariable("SHORT_AUGUST", $lng->txt("s_08"));
247  $tpl->setVariable("SHORT_SEPTEMBER", $lng->txt("s_09"));
248  $tpl->setVariable("SHORT_OCTOBER", $lng->txt("s_10"));
249  $tpl->setVariable("SHORT_NOVEMBER", $lng->txt("s_11"));
250  $tpl->setVariable("SHORT_DECEMBER", $lng->txt("s_12"));
251  $tpl->setVariable("ABOUT_CALENDAR", $lng->txt("about_calendar"));
252  $tpl->setVariable("ABOUT_CALENDAR_LONG", $lng->txt("about_calendar_long"));
253  $tpl->setVariable("ABOUT_TIME_LONG", $lng->txt("about_time"));
254  $tpl->setVariable("PREV_YEAR", $lng->txt("prev_year"));
255  $tpl->setVariable("PREV_MONTH", $lng->txt("prev_month"));
256  $tpl->setVariable("GO_TODAY", $lng->txt("go_today"));
257  $tpl->setVariable("NEXT_MONTH", $lng->txt("next_month"));
258  $tpl->setVariable("NEXT_YEAR", $lng->txt("next_year"));
259  $tpl->setVariable("SEL_DATE", $lng->txt("select_date"));
260  $tpl->setVariable("DRAG_TO_MOVE", $lng->txt("drag_to_move"));
261  $tpl->setVariable("PART_TODAY", $lng->txt("part_today"));
262  $tpl->setVariable("DAY_FIRST", $lng->txt("day_first"));
263  $tpl->setVariable("CLOSE", $lng->txt("close"));
264  $tpl->setVariable("TODAY", $lng->txt("today"));
265  $tpl->setVariable("TIME_PART", $lng->txt("time_part"));
266  $tpl->setVariable("DEF_DATE_FORMAT", $lng->txt("def_date_format"));
267  $tpl->setVariable("TT_DATE_FORMAT", $lng->txt("tt_date_format"));
268  $tpl->setVariable("WK", $lng->txt("wk"));
269  $tpl->setVariable("TIME", $lng->txt("time"));
270  $tpl->parseCurrentBlock();
271  $tpl->setCurrentBlock("CalendarJS");
272  $tpl->setVariable("LOCATION_JAVASCRIPT_CALENDAR", "./Services/Calendar/js/calendar.js");
273  $tpl->setVariable("LOCATION_JAVASCRIPT_CALENDAR_SETUP", "./Services/Calendar/js/calendar-setup.js");
274  $tpl->setVariable("LOCATION_JAVASCRIPT_CALENDAR_STYLESHEET", "./Services/Calendar/css/calendar.css");
275  $tpl->parseCurrentBlock();
276 
277  self::$init_done = "done";
278  }
global $tpl
Definition: ilias.php:8
global $lng
Definition: privfeed.php:40
+ Here is the caller graph for this function:

Field Documentation

◆ $default_calendar

ilCalendarUtil::$default_calendar = array()
staticprivate

Definition at line 36 of file class.ilCalendarUtil.php.

◆ $init_done

ilCalendarUtil::$init_done
static

Definition at line 37 of file class.ilCalendarUtil.php.

◆ $today

ilCalendarUtil::$today = null
staticprivate

Definition at line 35 of file class.ilCalendarUtil.php.


The documentation for this class was generated from the following file: