Jump to content

Datetime Class


niche
 Share

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". Edited by Synook
Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

×
×
  • Create New...