ILIAS
release_5-4 Revision v5.4.26-12-gabc799a52e6
|
Static Public Member Functions | |
static | parseDateTime ($dt, DateTimeZone $tz=null) |
Parses an iCalendar (rfc5545) formatted datetime and returns a DateTimeImmutable object. More... | |
static | parseDate ($date, DateTimeZone $tz=null) |
Parses an iCalendar (rfc5545) formatted date and returns a DateTimeImmutable object. More... | |
static | parseDuration ($duration, $asString=false) |
Parses an iCalendar (RFC5545) formatted duration value. More... | |
static | parse ($date, $referenceTz=null) |
Parses either a Date or DateTime, or Duration value. More... | |
static | parseVCardDateTime ($date) |
This method parses a vCard date and or time value. More... | |
static | parseVCardTime ($date) |
This method parses a vCard TIME value. More... | |
static | parseVCardDateAndOrTime ($date) |
This method parses a vCard date and or time value. More... | |
This class is responsible for parsing the several different date and time formats iCalendar and vCards have.
Definition at line 19 of file DateTimeParser.php.
|
static |
Parses either a Date or DateTime, or Duration value.
string | $date | |
DateTimeZone | string | $referenceTz |
Definition at line 205 of file DateTimeParser.php.
References Sabre\HTTP\parseDate().
Referenced by Sabre\VObject\Property\ICalendar\DateTime\getDateTimes(), Sabre\CalDAV\Backend\PDO\getDenormalizedData(), Sabre\VObject\Component\VFreeBusy\isFree(), Sabre\VObject\Recur\RDateIterator\next(), Sabre\VObject\ITip\Broker\parseEventForAttendee(), Sabre\VObject\Recur\RRuleIterator\parseRRule(), Sabre\VObject\DateTimeParserTest\testParseICalendarDate(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateGreaterThan4000(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateTimeGreaterThan4000(), and Sabre\VObject\DateTimeParserTest\testParseICalendarDurationDateInterval().
|
static |
Parses an iCalendar (rfc5545) formatted date and returns a DateTimeImmutable object.
string | $date | |
DateTimeZone | $tz |
Definition at line 65 of file DateTimeParser.php.
Referenced by Sabre\VObject\DateTimeParserTest\testParseICalendarDate(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateBadFormat(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateGreaterThan4000(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateInvalidDate(), and Sabre\VObject\Property\ICalendar\DateTime\validate().
|
static |
Parses an iCalendar (rfc5545) formatted datetime and returns a DateTimeImmutable object.
Specifying a reference timezone is optional. It will only be used if the non-UTC format is used. The argument is used as a reference, the returned DateTimeImmutable object will still be in the UTC timezone.
string | $dt | |
DateTimeZone | $tz |
Definition at line 34 of file DateTimeParser.php.
Referenced by Sabre\VObject\FreeBusyGenerator\calculateBusy(), Sabre\VObject\Property\ICalendar\Period\getJsonValue(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateTime(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateTimeBadFormat(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateTimeCustomTimeZone(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateTimeGreaterThan4000(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateTimeInvalidTime(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateTimeUTC(), Sabre\VObject\DateTimeParserTest\testParseICalendarDateTimeUTC2(), Sabre\VObject\Property\ICalendar\DateTime\validate(), Sabre\CalDAV\Xml\Filter\PropFilter\xmlDeserialize(), Sabre\CalDAV\Xml\Filter\CompFilter\xmlDeserialize(), Sabre\CalDAV\Xml\Filter\CalendarData\xmlDeserialize(), and Sabre\CalDAV\Xml\Request\FreeBusyQueryReport\xmlDeserialize().
|
static |
Parses an iCalendar (RFC5545) formatted duration value.
This method will either return a DateTimeInterval object, or a string suitable for strtotime or DateTime::modify.
string | $duration | |
bool | $asString |
Definition at line 99 of file DateTimeParser.php.
References $result.
Referenced by Sabre\VObject\FreeBusyGenerator\calculateBusy(), Sabre\VObject\Property\ICalendar\Duration\getDateInterval(), Sabre\VObject\Component\Available\getEffectiveStartEnd(), Sabre\VObject\Component\VAvailability\getEffectiveStartEnd(), Sabre\VObject\Component\VAlarm\getEffectiveTriggerTime(), Sabre\VObject\Component\VTodo\isInTimeRange(), Sabre\VObject\Component\VEvent\isInTimeRange(), Sabre\VObject\Component\VAlarm\isInTimeRange(), Sabre\VObject\DateTimeParserTest\testParseICalendarDuration(), Sabre\VObject\DateTimeParserTest\testParseICalendarDurationDateInterval(), and Sabre\VObject\DateTimeParserTest\testParseICalendarDurationFail().
|
static |
This method parses a vCard date and or time value.
This can be used for the DATE, DATE-TIME and DATE-AND-OR-TIME value.
This method returns an array, not a DateTime value. The elements in the array are in the following order: year, month, date, hour, minute, second, timezone Almost any part of the string may be omitted. It's for example legal to just specify seconds, leave out the year, etc.
Timezone is either returned as 'Z' or as '+0800'
For any non-specified values null is returned.
List of date formats that are supported: 20150128 2015-01 –01 –0128 —28
List of supported time formats: 13 1353 135301 -53 -5301 –01 (unreachable, see the tests) –01Z –01+1234
List of supported date-time formats: 20150128T13 –0128T13 —28T13 —28T1353 —28T135301 —28T13Z —28T13+1234
See the regular expressions for all the possible patterns.
Times may be postfixed by a timezone offset. This can be either 'Z' for UTC, or a string like -0500 or +1100.
string | $date |
Definition at line 509 of file DateTimeParser.php.
Referenced by Sabre\VObject\DateTimeParserTest\assertDateAndOrTimeEqualsTo(), and Sabre\VObject\Property\VCard\DateAndOrTime\xmlSerializeValue().
|
static |
This method parses a vCard date and or time value.
This can be used for the DATE, DATE-TIME, TIMESTAMP and DATE-AND-OR-TIME value.
This method returns an array, not a DateTime value.
The elements in the array are in the following order: year, month, date, hour, minute, second, timezone
Almost any part of the string may be omitted. It's for example legal to just specify seconds, leave out the year, etc.
Timezone is either returned as 'Z' or as '+0800'
For any non-specified values null is returned.
List of date formats that are supported: YYYY YYYY-MM YYYYMMDD –MMDD —DD
YYYY-MM-DD –MM-DD —DD
List of supported time formats:
HH HHMM HHMMSS -MMSS –SS
HH HH:MM HH:MM:SS -MM:SS –SS
A full basic-format date-time string looks like : 20130603T133901
A full extended-format date-time string looks like : 2013-06-03T13:39:01
Times may be postfixed by a timezone offset. This can be either 'Z' for UTC, or a string like -0500 or +1100.
string | $date |
Definition at line 273 of file DateTimeParser.php.
References $result.
Referenced by Sabre\VObject\VCardConverter\convertProperty(), Sabre\VObject\Property\VCard\DateAndOrTime\getDateTime(), Sabre\VObject\Property\VCard\TimeStamp\getJsonValue(), Sabre\VObject\Property\VCard\DateAndOrTime\getJsonValue(), Sabre\VObject\BirthdayCalendarGenerator\getResult(), Sabre\VObject\DateTimeParserTest\testBadVCardDate(), Sabre\VObject\DateTimeParserTest\testVCardDate(), and Sabre\VObject\Property\VCard\DateAndOrTime\validate().
|
static |
This method parses a vCard TIME value.
This method returns an array, not a DateTime value.
The elements in the array are in the following order: hour, minute, second, timezone
Almost any part of the string may be omitted. It's for example legal to just specify seconds, leave out the hour etc.
Timezone is either returned as 'Z' or as '+08:00'
For any non-specified values null is returned.
List of supported time formats:
HH HHMM HHMMSS -MMSS –SS
HH HH:MM HH:MM:SS -MM:SS –SS
A full basic-format time string looks like : 133901
A full extended-format time string looks like : 13:39:01
Times may be postfixed by a timezone offset. This can be either 'Z' for UTC, or a string like -0500 or +11:00.
string | $date |
Definition at line 397 of file DateTimeParser.php.
References $result.
Referenced by Sabre\VObject\Property\Time\getJsonValue(), and Sabre\VObject\DateTimeParserTest\testBadVCardTime().