public static function EasyRdf_Literal_DateTime::parse in Zircon Profile 8.0
Same name and namespace in other branches
- 8 vendor/easyrdf/easyrdf/lib/EasyRdf/Literal/DateTime.php \EasyRdf_Literal_DateTime::parse()
Parses a string using DateTime and creates a new literal
Example: $dt = EasyRdf_Literal_DateTime::parse('Mon 18 Jul 2011 18:45:43 BST');
Parameters
string $value The date and time to parse:
Return value
object EasyRdf_Literal_DateTime
Overrides EasyRdf_Literal_Date::parse
See also
DateTime
File
- vendor/
easyrdf/ easyrdf/ lib/ EasyRdf/ Literal/ DateTime.php, line 85
Class
- EasyRdf_Literal_DateTime
- Class that represents an RDF Literal of datatype xsd:dateTime
Code
public static function parse($value) {
$value = new DateTime($value);
return new EasyRdf_Literal_DateTime($value);
}