From 2414e228e1ad56ce0cd6fe00762e2abe11869991 Mon Sep 17 00:00:00 2001 From: Goran Rakic Date: Fri, 20 Jul 2012 16:42:06 +0300 Subject: [PATCH] Fix syntax highlight --- _posts/05-03-01-Date-and-Time.md | 3 +++ 1 file changed, 3 insertions(+) diff --git a/_posts/05-03-01-Date-and-Time.md b/_posts/05-03-01-Date-and-Time.md index b7fe666..0d9a6de 100644 --- a/_posts/05-03-01-Date-and-Time.md +++ b/_posts/05-03-01-Date-and-Time.md @@ -24,6 +24,7 @@ take a DateInterval as an argument. Do not write code that expect same number of saving and timezone alterations will break that assumption. Use date intervals instead. To calculate date difference use the `diff()` method. It will return new DateInterval, which is super easy to display. {% highlight php %} +add(new \DateInterval('P1M6D')); @@ -35,6 +36,7 @@ echo "Difference: " . $diff->format('%m month, %d days (total: %a days)') . "\n" On DateTime objects you can use standard comparison: {% highlight php %} +