Forums

The forums ran from 2008-2020 and are now closed and viewable here as an archive.

Home Forums JavaScript Help with PHP script – odd month, fourth Monday

  • This topic is empty.
Viewing 2 posts - 1 through 2 (of 2 total)
  • Author
    Posts
  • #34232
    chadritchie
    Member

    I am trying to come up with a PHP script that will display a next meeting date.
    For example, a meeting will take place Sept. 26. At the end of that month, the date on the web site needs to change to Nov. 28.
    The meetings take place the fourth Monday of every other month.
    The months are odd numbered months (Jan., March, May, July, Sept., Nov.)
    We are stumped!

    #86502
    chadritchie
    Member

    Never mind, problem solved with a couple work arounds.


    //define this month
    $month = date ('m');
    if ($month % 2) {
    //if its odd then show 4th Monday
    echo date('F d', strtotime('third Monday'));
    }
    else{
    //its even no meeting this month show next months meeting
    echo date('F d', strtotime('third Monday +4 week'));
    }
    ?>
Viewing 2 posts - 1 through 2 (of 2 total)
  • The forum ‘JavaScript’ is closed to new topics and replies.