[sf-lug] how to detect the first Sunday in PHP

jim stockford jim at well.com
Thu Feb 9 23:37:31 PST 2006


    Vince and I are working on updating the sf-lug web
site. We've agreed to use apache and php, with
ambitions to integrate with some kind of database....

    I'm supposed to figure out how we can dynamically
test the current date and update the web page to show
the next meeting, which is either the first Sunday or the
third Monday of the month.
    For example, if it's the tenth of February, the web
site should tell people the next meeting is Monday,
February 20. On Tuesday, February 21 the web site
should proclaim the next meeting as Sunday March 5.

    So far, walking the output of the cal utility and
making sense of the date function in PHP is difficult.
I'll keep working, hoping that someone will point to
some code that does the trick.
jim







More information about the sf-lug mailing list