Lines Matching refs:date

48 …$date = new DateTimeImmutable($matches[1] . '-' . $matches[2] . '-' . $matches[3] . ' ' . $matches…
53 return $date;
60 * @param string $date
65 static function parseDate($date, DateTimeZone $tz = null) { argument
68 $result = preg_match('/^([0-9]{4})([0-1][0-9])([0-3][0-9])$/', $date, $matches);
71 … throw new InvalidDataException('The supplied iCalendar date value is incorrect: ' . $date);
79 $date = new DateTimeImmutable($matches[1] . '-' . $matches[2] . '-' . $matches[3], $tz);
81 … throw new InvalidDataException('The supplied iCalendar date value is incorrect: ' . $date);
84 return $date;
200 * @param string $date
205 static function parse($date, $referenceTz = null) { argument
207 if ($date[0] === 'P' || ($date[0] === '-' && $date[1] === 'P')) {
208 return self::parseDuration($date);
209 } elseif (strlen($date) === 8) {
210 return self::parseDate($date, $referenceTz);
212 return self::parseDateTime($date, $referenceTz);
269 * @param string $date
273 static function parseVCardDateTime($date) { argument
298 if (!preg_match($regex, $date, $matches)) {
323 if (!preg_match($regex, $date, $matches)) {
324 throw new InvalidDataException('Invalid vCard date-time string: ' . $date);
393 * @param string $date
397 static function parseVCardTime($date) { argument
413 if (!preg_match($regex, $date, $matches)) {
429 if (!preg_match($regex, $date, $matches)) {
430 throw new InvalidDataException('Invalid vCard time string: ' . $date);
505 * @param string $date
509 static function parseVCardDateAndOrTime($date) { argument
540 if (0 === preg_match($valueDate, $date, $matches)
541 && 0 === preg_match($valueDateTime, $date, $matches)
542 && 0 === preg_match($valueTime, $date, $matches)) {
543 throw new InvalidDataException('Invalid vCard date-time string: ' . $date);