php date |
[eluser]1mr3yn[/eluser]
I just wanted to get the number of week in a month. Code: echo "Process Date: " . date("Y-M-d"), "<br>"; im done in getting the next tuesday. but the problem is, i cant find the algorithm that will post the week number. Quote: For example: Thanks Guyz!
[eluser]davidbehler[/eluser]
Check the documentation: http://de3.php.net/manual/en/function.date.php Code: date('W');
[eluser]sophistry[/eluser]
um, is this a trick question? i'm pretty sure you can divide the day number by 7 to get the week number - if I remember correctly from my school days. ;-) EDIT: darn, replied too quickly... it *was* a trick question... you need the day-monthstart offset too. |
Welcome Guest, Not a member yet? Register Sign In |