com presentations: Fixed a slide, and clarify %d vs %a in formatting intervals.: slides/time/intervals-2.xml slides/time/intervals.xml

From: Date: Tue, 09 Oct 2012 11:07:36 +0000
Subject: com presentations: Fixed a slide, and clarify %d vs %a in formatting intervals.: slides/time/intervals-2.xml slides/time/intervals.xml
Groups: php.pres 
Request: Send a blank email to pres+get-1849@lists.php.net to get a copy of this message
Commit: 80e875b41fd4d4c9c422f296abb2c1ae6ee155b4 Author: Derick Rethans <github@derickrethans.nl> Tue, 9 Oct 2012 12:07:36 +0100 Parents: 67fc2976b74635736c2dfb751fb0893628955b9f Branches: master Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=80e875b41fd4d4c9c422f296abb2c1ae6ee155b4 Log: Fixed a slide, and clarify %d vs %a in formatting intervals. Changed paths: M slides/time/intervals-2.xml M slides/time/intervals.xml Diff: diff --git a/slides/time/intervals-2.xml b/slides/time/intervals-2.xml index 11d6d13..d9a902b 100644 --- a/slides/time/intervals-2.xml +++ b/slides/time/intervals-2.xml @@ -4,7 +4,7 @@ <subtitle>Applying an interval</subtitle> <example result="0"><![CDATA[<?php -$d = new DateTime( 'May 29th, 2012' ); +$d = new DateTime( 'Aug 27th, 2009' ); echo $d->format( "l Y-m-d\n" ); $i = DateInterval::createFromDateString( "next weekday" ); diff --git a/slides/time/intervals.xml b/slides/time/intervals.xml index 649e8f4..c84c7a9 100644 --- a/slides/time/intervals.xml +++ b/slides/time/intervals.xml @@ -17,8 +17,8 @@ $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> -<break lines="2"/> <example><![CDATA[<?php // create from string $i = DateInterval::createFromDateString( "next weekday" );

« previous php.pres (#1849) next »