Mateobus Posted March 14, 2007 Share Posted March 14, 2007 is there a way to calculate the 3rd monday of september for a given year with php? Any help is appreciated. Quote Link to comment Share on other sites More sharing options...
kenrbnsn Posted March 14, 2007 Share Posted March 14, 2007 Use the strtotime() function: <?php echo '<br>The third Monday in September, 2007 is ' . date('l, F jS, Y',strtotime('third monday',strtotime('2007-09-01'))); ?> Note: in my testing of this, it got the 3rd Monday of September 2008 wrong, but other years were right. Ken Quote Link to comment Share on other sites More sharing options...
Mateobus Posted March 14, 2007 Author Share Posted March 14, 2007 works for me, thanks Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.