hello people long time no forum for me, sorry i was wondering how i could calculate the 2nd sunday of every month in php or something similar i had a look at strtotime() but couldnt think of how to use it
thanks for your help
senorbadger
Printable View
hello people long time no forum for me, sorry i was wondering how i could calculate the 2nd sunday of every month in php or something similar i had a look at strtotime() but couldnt think of how to use it
thanks for your help
senorbadger
I dont know...but since no-one had replied.. i would possibly suggest using a julian date.
have to go for own function
i think i have a solution
the user will provide a start date so...
eg: user enters "5/06/2005" (UK date)
this is really in effcient
my script can use mktime() to get the value for "next sunday"
in a loop store the value given for next "sunday" and calculate the next sunday do this 4 times
that gives the the same sunday the next month
though its not the best way do u think it will work ?
Well the days of monts vary from 28 to 31? Is that not an issue?