Page 1 of 1

show week number on calendar

Posted: Thu Oct 19, 2006 3:27 pm
by amir
i have coded a calendar and i am trying to add the week number for each week down the side.

i have the days (S, M, T ... S) across the top and then im showing the dates underneath that <td> tag.

i know how to get the current week number: date('W'), but i am not sure how to get the current week number for each week and display it on my calendar...

here is my calendar so you can see my layout. in the blank boxs on the left is where i want to display the week number.

http://www.ukpegasus.co.uk/ellandrd/cal

this calendar only shows current month...

Posted: Thu Oct 19, 2006 3:34 pm
by feyd
Give date() a timestamp in that week. Note that the second argument is a timestamp. These can be produced from time(), strtotime(), mktime() among other functions found in php.