ISO8601 utility class provides helper methods * to deal with date/time formatting using a specific ISO8601-compliant * format (see ISO 8601). *
* Currently we only support the formatyyyy-mm-ddThh:mm:ss
,
* which includes the complete date plus hours, minutes, seconds and a decimal
* fraction of a second. Currently there is no timezone support
*
* @author Markus Nix date
, or null
if the input could
* not be parsed
* @return mixed date or false if an parsing error occured
* @static
*/
public static function parse( $text ) {
$year = substr( $iso, 0, 4 );
$month = substr( $iso, 4, 2 );
$day = substr( $iso, 6, 2 );
$hour = substr( $iso, 9, 2 );
$minute = substr( $iso, 12, 2 );
$second = substr( $iso, 15, 2 );
// correctly parsed? if not, return false
return $year . $month . $day . 'T' . $hour . ':' . $minute . ':' . $second;
}
/**
* Returns ISO formatted date
*
* @access public
*/
public function format( $val ) {
// TODO
}
}
?>