faqts : Computers : Programming : Languages : PHP : Function Libraries : Date and Time

+ Search
Add Entry AlertManage Folder Edit Entry Add page to http://del.icio.us/
Did You Find This Entry Useful?

0 of 5 people (0%) answered Yes
Recently 0 of 5 people (0%) answered Yes

Entry

I'm looking to display the numeric week number as well as the textual date range

Nov 13th, 2005 03:22
Matthew Wilkinson, Steve Holmquist,


I'm not sure what you mean by week number, but here are a few ways I
interpreted it:
To get the number that is the number of weeks that have passed in the
year so far, use date('W'); note that this only works in PHP versions
4.1.0 and above.
Another interpretation is the day of the week in numeric form wihch is
date('w'); which gives 0 for Sunday 1 for Monday etc.