Canman2005 Posted November 22, 2007 Share Posted November 22, 2007 Hi all Wondering if someone can help me. Basically I have two dates in the format of YYYY-MM-DD, so for example I might have; 2007-02-23 & 2007-03-12 What I need to do is to work out 1: how many weekends there are (sat & sun) 2: how many weekdays there are (mon - fri) 3: how many total weeks there are contained between the two dates I have. Is this easy to do? can anyone help? thanks so much dave Quote Link to comment Share on other sites More sharing options...
Barand Posted November 22, 2007 Share Posted November 22, 2007 date ('w', strtotime($date)) will give the day of the week for a date. Loop between the 2 dates and count them. 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.