PHP Classes

Why not DateTime

Recommend this page to a friend!

      Cron PHP DateDiff  >  All threads  >  Why not DateTime  >  (Un) Subscribe thread alerts  
Subject:Why not DateTime
Summary:Why dont you use DateTime Objects.
Messages:3
Author:meivin123
Date:2014-09-24 14:29:33
 

  1. Why not DateTime   Reply   Report abuse  
Picture of meivin123 meivin123 - 2014-09-24 14:29:33
Why dont you just sue the DateTime::diff() method to determine time diffrences.
It is available in PHP 5.2

  2. Re: Why not DateTime   Reply   Report abuse  
Picture of Everton da Rosa Everton da Rosa - 2014-09-24 17:52:31 - In reply to message 1 from meivin123
Because at the time did not know this.

  3. Re: Why not DateTime   Reply   Report abuse  
Picture of meivin123 meivin123 - 2014-09-24 20:45:31 - In reply to message 2 from Everton da Rosa
You realy should. Ive worked with date functions too, but DateTime, DateInterval and DatePeriod gives you so much more opportunitys.
Good article to start is this here:

code.tutsplus.com/tutorials/dates-a ...