class DateTime in Zircon Profile 8
Same name in this branch
- 8 vendor/zendframework/zend-stdlib/src/DateTime.php \Zend\Stdlib\DateTime
- 8 vendor/symfony/validator/Constraints/DateTime.php \Symfony\Component\Validator\Constraints\DateTime
- 8 core/lib/Drupal/Core/Datetime/Element/Datetime.php \Drupal\Core\Datetime\Element\Datetime
Same name and namespace in other branches
- 8.0 vendor/zendframework/zend-stdlib/src/DateTime.php \Zend\Stdlib\DateTime
DateTime
An extension of the \DateTime object.
Hierarchy
Expanded class hierarchy of DateTime
12 string references to 'DateTime'
- AbstractComparisonValidatorTestCase::addPhp5Dot5Comparisons in vendor/
symfony/ validator/ Tests/ Constraints/ AbstractComparisonValidatorTestCase.php - Debug::export in vendor/
doctrine/ common/ lib/ Doctrine/ Common/ Util/ Debug.php - DebugTest::testExportDateTime in vendor/
doctrine/ common/ tests/ Doctrine/ Tests/ Common/ Util/ DebugTest.php - EqualToValidatorTest::provideInvalidComparisons in vendor/
symfony/ validator/ Tests/ Constraints/ EqualToValidatorTest.php - GreaterThanOrEqualValidatorTest::provideInvalidComparisons in vendor/
symfony/ validator/ Tests/ Constraints/ GreaterThanOrEqualValidatorTest.php
File
- vendor/
zendframework/ zend-stdlib/ src/ DateTime.php, line 23
Namespace
Zend\StdlibView source
class DateTime extends \DateTime {
/**
* The DateTime::ISO8601 constant used by php's native DateTime object does
* not allow for fractions of a second. This function better handles ISO8601
* formatted date strings.
*
* @param string $time
* @param DateTimeZone $timezone
* @return mixed
*/
public static function createFromISO8601($time, DateTimeZone $timezone = null) {
$format = self::ISO8601;
if (isset($time[19]) && $time[19] === '.') {
$format = 'Y-m-d\\TH:i:s.uO';
}
if ($timezone !== null) {
return self::createFromFormat($format, $time, $timezone);
}
return self::createFromFormat($format, $time);
}
}
Members
Name | Modifiers | Type | Description | Overrides |
---|---|---|---|---|
DateTime:: |
public static | function |
The DateTime::ISO8601 constant used by php's native DateTime object does
not allow for fractions of a second. This function better handles ISO8601
formatted date strings. Overrides DateTime:: |
1 |