ILIAS  trunk Revision v11.0_alpha-1749-g1a06bdef097
All Data Structures Namespaces Files Functions Variables Enumerations Enumerator Modules Pages
ilDate Class Reference

Class for single dates. More...

+ Inheritance diagram for ilDate:
+ Collaboration diagram for ilDate:

Public Member Functions

 __construct ($a_date='', $a_format=0)
 
 get (int $a_format, string $a_format_str='', string $a_tz='')
 
 __toString ()
 To string for dates. More...
 
- Public Member Functions inherited from ilDateTime
 __construct ($a_date=null, int $a_format=0, string $a_tz='')
 Create new date object. More...
 
 __clone ()
 
 __sleep ()
 
 __wakeup ()
 
 isNull ()
 Check if a date is null (Datetime == '0000-00-00 00:00:00', unixtime == 0,...) More...
 
 switchTimeZone (string $a_timezone_identifier='')
 Switch timezone. More...
 
 getTimeZoneIdentifier ()
 
 increment (string $a_type, int $a_count=1)
 
 getUnixTime ()
 
 setDate ($a_date, int $a_format)
 Set date. More...
 
 get (int $a_format, string $a_format_str='', string $a_tz='')
 get formatted date More...
 
 __toString ()
 to string for date time objects Output is user time zone public More...
 

Additional Inherited Members

- Static Public Member Functions inherited from ilDateTime
static _before (ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
 compare two dates and check start is before end This method does not consider tz offsets. More...
 
static _equals (ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
 Check if two date are equal. More...
 
static _after (ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
 compare two dates and check start is after end This method does not consider tz offsets. More...
 
static _within (ilDateTime $dt, ilDateTime $start, ilDateTime $end, string $a_compare_field='', string $a_tz='')
 Check whether an date is within a date duration given by start and end. More...
 
- Data Fields inherited from ilDateTime
const YEAR = 'year'
 
const MONTH = 'month'
 
const WEEK = 'week'
 
const DAY = 'day'
 
const HOUR = 'hour'
 
const MINUTE = 'minute'
 
const SECOND = 'second'
 
- Protected Member Functions inherited from ilDateTime
 parsePartsToDate (int $a_year, int $a_month, int $a_day, ?int $a_hour=null, ?int $a_min=null, ?int $a_sec=null, ?string $a_timezone=null)
 
- Protected Attributes inherited from ilDateTime
ilLogger $log
 
ilTimeZone $timezone = null
 
ilTimeZone $default_timezone = null
 
DateTime $dt_obj = null
 

Detailed Description

Class for single dates.

ilDate('2008-03-15') is nothing else than ilDateTime('2008-03-15',IL_CAL_DATE,'UTC')

Author
Stefan Meyer meyer.nosp@m.@lei.nosp@m.fos.c.nosp@m.om
Version
$Id$

Definition at line 27 of file class.ilDate.php.

Constructor & Destructor Documentation

◆ __construct()

ilDate::__construct (   $a_date = '',
  $a_format = 0 
)

Definition at line 29 of file class.ilDate.php.

References ILIAS\GlobalScreen\Provider\__construct(), ilTimeZone\_getInstance(), and ilTimeZone\UTC.

30  {
31  parent::__construct($a_date, $a_format, ilTimeZone::UTC);
32 
33  $this->default_timezone = ilTimeZone::_getInstance('UTC');
34  }
static _getInstance(string $a_tz='')
get instance by timezone
__construct(Container $dic, ilPlugin $plugin)
+ Here is the call graph for this function:

Member Function Documentation

◆ __toString()

ilDate::__toString ( )

To string for dates.

Definition at line 44 of file class.ilDate.php.

References IL_CAL_DATE.

44  : string
45  {
46  return $this->get(IL_CAL_DATE) . '<br />';
47  }
const IL_CAL_DATE

◆ get()

ilDate::get ( int  $a_format,
string  $a_format_str = '',
string  $a_tz = '' 
)

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

References ILIAS\GlobalScreen\get().

Referenced by ilCalendarUtil\_buildWeekDayList(), ilCalendarSchedule\getByDay(), ilCalendarSchedule\getChangedEvents(), ILIAS\BookingManager\BookingProcess\BookingProcessManager\getRecurrenceMissingAvailability(), and ilCalendarAppointmentGUI\initInitialDate().

37  {
38  return parent::get($a_format, $a_format_str);
39  }
get(string $class_name)
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

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