Jump to content

Datetime Class


niche

Recommended Posts

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

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 timestamp
So, the argument accepts "about any English textual datetime description".
Link to comment
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...