This is some foxpro code which is not too dissimilar to PHP
dDate = date() // todays date
do while dow(dDate) != 0 // dow = day of week
dDate = dDate - 1 // reduce date by 1
enddo
print dDate // depending on the language this would probably be a sunday.
My problem is depricating the date
I have had a few endless loops but the ISP's server is still running (just)
Richard
dDate = date() // todays date
do while dow(dDate) != 0 // dow = day of week
dDate = dDate - 1 // reduce date by 1
enddo
print dDate // depending on the language this would probably be a sunday.
My problem is depricating the date
I have had a few endless loops but the ISP's server is still running (just)
Richard