$startDate = "20150624";
$endDate = "20150722";
$startDate = strtotime($startDate);
$endDate = strtotime($endDate);
$dayLength = 60 * 60 * 24;
$checkDateRange = ($endDate - $startDate) / $dayLength;
$datesStartMonth = date('t', $startDate);
if ($checkDateRange > $datesStartMonth) {
echo $error = "Date range should be with in one month";
}
Related Articles
How to Create Ical File to Work on Outlook, Google Calendar and Mac Icalendar
To Create Ical files we need to follow some standards set by ietf.org. Below are the working copies of the sample ical files created and these are tested on Outlook calendar, Google Calendar, Mac Icalendar, and Thunder Bird Calendar with Lightning plugin. How to Create Ical File Contents show 1. How to Create Ical File […]
How to Detect a Adblock on Website or Blog and Show Pop up Message
Many people these are installing plugins like Adblock to block ads on the websites/blog and for few People earning from Ads are the main income stream, so today I found this below script where it can detect whether the user has installed Adblock any other plugins which are not displaying Ads on the website and […]
How to Set Iframe Height to 100%
Use below snippet to set height of an iframe to 100%, however we can also set width of ifram to 100% also. <iframe src=”http://domain.com” frameborder=”0″></iframe> iframe { display:block; width:100%; height:100vh; }