"Emmanuel Ayrault" <emmanuel.ayrault@nospamvoila.fr> schreef in bericht
news:42ec03a0$0$305$7a628cd7@news.club-internet.fr...
> return date('d M Y',strtotime($day, strtotime($date)));
At a first glance this is a good suggestion, I didn't realise that strtotime
could have a second parameter, I will certainly try that
>(in fact, it depends on what you want to do).
I didn't give the complete explanation why I needed it because I thought my
message would be too large but maybe you can still give me some suggestions:
on the website of our local church, the celebrations for next weekend are
retrieved from a Mysql database. Since they are usually on Saturday and
Sunday, I decided to refresh them on Monday. However in some cases it can be
practical to show the celebrations for more then one week at once (e.g. in
the week before Eastern there are more masses on other weekdays, Monday
after Eastern logically belongs to the weekend before, Christmas can be
every day of the week etc.). Such exceptions occur about five times a year.
I also tried other "refresh dates" like Tuesday but there will always be
exceptions.
So I decided to create two fields firstdisplaytime and lastdisplaytime and I
made a webform where the staff can update the scheduling. Up to now
firstdisplaytime and lastdisplaytime are updated manually but I would like
to write such a code that both fields are calculated automatically (monday
before and after the celebrations) unless these dates are filled in
explicitely by the staff.
Additional suggestions will be welcome, thanks anyway.
Martien.
Received on Tue Oct 18 02:06:32 2005