<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
	<title>Parsing Dates</title>
	<subtitle>With full control</subtitle>

	<blurb>Parsing strings with the ~date_parse()~ function:</blurb>
	<example result="1"><![CDATA[<pre><?php
$date = "22apr2006 8:36:14.43 #^ Europe/Oslo CEST";
$t = date_parse( $date );

echo $t['year'], '-', $t['month'], '-', $t['day'], " ";
echo $t['hour'], ':', $t['minute'], ':', $t['second'] + $t['fraction'], " ";
echo $t['tz_id'], "\n";

if ( $t['warning_count'] )
	echo "Warnings:\n";
	foreach( $t['warnings'] as $pos => $message )
		echo "- $message @$pos\n";
if ( $t['error_count'] )
	echo "Errors:\n";
	foreach( $t['errors'] as $pos => $message )
		echo "- $message @$pos\n";]]></example>
<break/>
	
</slide>

