niche Posted November 12, 2009 Share Posted November 12, 2009 I found this script and don't understand where the argument 'next thursday' came form. I can't find it in the manual for the DateTime class. Shouldn't I be able to find it there? <?php$date = new DateTime('next Thursday');echo $date->format('l, F jS, Y');?> Thanks Link to comment Share on other sites More sharing options...
Synook Posted November 12, 2009 Share Posted November 12, 2009 http://www.php.net/manual/en/datetime.construct.php timeString in a format accepted by strtotime(), defaults to "now". Link to comment Share on other sites More sharing options...
niche Posted November 12, 2009 Author Share Posted November 12, 2009 But, where's the documentation for the argument? Link to comment Share on other sites More sharing options...
Synook Posted November 12, 2009 Share Posted November 12, 2009 Well, it says it takes strings acceptable by strtotime(), so we could look there - http://www.php.net/manual/en/function.strtotime.php strtotime — Parse about any English textual datetime description into a Unix timestampSo, the argument accepts "about any English textual datetime description". Link to comment Share on other sites More sharing options...
Ingolme Posted November 12, 2009 Share Posted November 12, 2009 It's a really intelligent system that knows English date representations, such as "tomorrow," "last week," and "+2 months" Link to comment Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.