Lines Matching refs:date
48 …$date = new DateTimeImmutable($matches[1].'-'.$matches[2].'-'.$matches[3].' '.$matches[4].':'.$mat…
53 return $date;
59 * @param string $date
64 public static function parseDate($date, DateTimeZone $tz = null) argument
67 $result = preg_match('/^([0-9]{4})([0-1][0-9])([0-3][0-9])$/', $date, $matches);
70 … throw new InvalidDataException('The supplied iCalendar date value is incorrect: '.$date);
78 $date = new DateTimeImmutable($matches[1].'-'.$matches[2].'-'.$matches[3], $tz);
80 … throw new InvalidDataException('The supplied iCalendar date value is incorrect: '.$date);
83 return $date;
193 * @param string $date
198 public static function parse($date, $referenceTz = null) argument
200 if ('P' === $date[0] || ('-' === $date[0] && 'P' === $date[1])) {
201 return self::parseDuration($date);
202 } elseif (8 === strlen($date)) {
203 return self::parseDate($date, $referenceTz);
205 return self::parseDateTime($date, $referenceTz);
261 * @param string $date
265 public static function parseVCardDateTime($date) argument
290 if (!preg_match($regex, $date, $matches)) {
314 if (!preg_match($regex, $date, $matches)) {
315 throw new InvalidDataException('Invalid vCard date-time string: '.$date);
380 * @param string $date
384 public static function parseVCardTime($date) argument
399 if (!preg_match($regex, $date, $matches)) {
414 if (!preg_match($regex, $date, $matches)) {
415 throw new InvalidDataException('Invalid vCard time string: '.$date);
486 * @param string $date
490 public static function parseVCardDateAndOrTime($date) argument
521 if (0 === preg_match($valueDate, $date, $matches)
522 && 0 === preg_match($valueDateTime, $date, $matches)
523 && 0 === preg_match($valueTime, $date, $matches)) {
524 throw new InvalidDataException('Invalid vCard date-time string: '.$date);