<?xml version="1.0" encoding="ISO-8859-1"?>
<slide>
	<title>Intervals</title>
	<blurb>Creating an interval:</blurb>

	<example result="1"><![CDATA[<?php
// full notation
$i = new DateInterval( 'P0003-01-15T06:12:30' );

// abbreviated notation
$i = new DateInterval( 'P3DT6H' );

// from a difference
$d1 = new DateTimeImmutable();
$d2 = new DateTimeImmutable( "2019-10-31 23:00 Europe/London" );
$i = $d1->diff( $d2 );

// displaying the difference
echo $i->format( '%a days, %h hours, %i minutes' ), "\n";
echo $i->format( '%m months, %d days, %h hours, %i minutes' ), "\n";
?>]]></example>
	<example><![CDATA[<?php
// create from string
$i = DateInterval::createFromDateString( "next weekday" );
?>]]></example>
</slide>
