Last update: 31.03.2008 | © 2023 Julian von Mendel | Datenschutz
<?php
/* xml_extension class
* (C) 2006 Julian von Mendel (http://derjulian.net)
* License: LGPL
*/
class xml_date implements xml_widget
{
public $node;
public $xml ;
function __construct($node, $xml)
{
$this->node = $node;
$this->xml = $xml ;
}
public static function dtd()
{
return <<<DTD
DTD;
}
public function output($returntype = "xhtml")
{
$parse = $this->xml->parseNode($this->node, True, True, True, array("format"));
return date(($parse["attributes_array"]["format"] == "") ? "Y-m-d" : $parse["attributes_array"]["format"], ($this->node->childNodes->length) ? (int)trim($parse["content_string"]) : date("U"));
}
}
?>
© 2009 Julian von Mendel (http://derjulian.net) | Datum: 07.12.2023