com presentations: Missing Sunshine Date/Time slides.: slides/time/date-modify-immutable.xml slides/time/date-modify-immutable1.xml slides/time/date-modify-immutable2.xml
[email protected] (Derick Rethans)
| Newsgroups | php.pres |
|---|---|
| Message-ID | <[email protected]> |
Commit: 049e4e09d1c656e5e42d2bc71d75c0f8a90bcfc6 Author: Derick Rethans <[email protected]> Mon, 17 Feb 2014 12:45:08 +0000 Parents: eefc03d4c446c730dabe9e87ab4a7bcb5a0e4631 Branches: master Link: http://git.php.net/?p=presentations.git;a=commitdiff;h=049e4e09d1c656e5e42d2bc71d75c0f8a90bcfc6 Log: Missing Sunshine Date/Time slides. Changed paths: A slides/time/date-modify-immutable.xml A slides/time/date-modify-immutable1.xml A slides/time/date-modify-immutable2.xml Diff: diff --git a/slides/time/date-modify-immutable.xml b/slides/time/date-modify-immutable.xml new file mode 100644 index 0000000..329a8b5 --- /dev/null +++ b/slides/time/date-modify-immutable.xml @@ -0,0 +1,24 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<slide> + <title>Immutable DateTime</title> + +<div effect="fade-in"> + <blurb>Standard:</blurb> + <example result="1"><![CDATA[<?php + $ts = new DateTime("2010-03-08 15:53:55"); + $new = $ts->modify("+2 days"); + echo $ts->format(DateTime::RFC822), "\n"; + echo $new->format(DateTime::RFC822), "\n"; +?>]]></example> +</div> + +<div effect="fade-in"> + <blurb>Immutable (new in PHP 5.5):</blurb> + <example result="1"><![CDATA[<?php + $ts = new DateTimeImmutable("2010-03-08 15:53:55"); + $new = $ts->modify("+2 days"); + echo $ts->format(DateTime::RFC822), "\n"; + echo $new->format(DateTime::RFC822), "\n"; +?>]]></example> +</div> +</slide> diff --git a/slides/time/date-modify-immutable1.xml b/slides/time/date-modify-immutable1.xml new file mode 100644 index 0000000..63baf93 --- /dev/null +++ b/slides/time/date-modify-immutable1.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<slide> + <title>Immutable DateTime</title> + + <blurb>Standard:</blurb> + <example result="1"><![CDATA[<?php + $ts = new DateTime("2010-03-08 15:53:55"); + $new = $ts->modify("+2 days"); + echo $ts->format(DateTime::RFC822), "\n"; + echo $new->format(DateTime::RFC822), "\n"; +?>]]></example> +</slide> diff --git a/slides/time/date-modify-immutable2.xml b/slides/time/date-modify-immutable2.xml new file mode 100644 index 0000000..d549490 --- /dev/null +++ b/slides/time/date-modify-immutable2.xml @@ -0,0 +1,12 @@ +<?xml version="1.0" encoding="ISO-8859-1"?> +<slide> + <title>Immutable DateTime</title> + + <blurb>Immutable (new in PHP 5.5):</blurb> + <example result="1"><![CDATA[<?php + $ts = new DateTimeImmutable("2010-03-08 15:53:55"); + $new = $ts->modify("+2 days"); + echo $ts->format(DateTime::RFC822), "\n"; + echo $new->format(DateTime::RFC822), "\n"; +?>]]></example> +</slide>