Default TemplateGreen TemplateBlue TemplateRed TemplateGold TemplateBlue Gloss Template
Article Categories

Mycities Network
PHP Scripts Examples and Tutorials
Check number of days between 2 dates

Thursday Nov 30, 2006
This is a little old function I have made, but up-to now it is very useful for me to include in many place: if you pass start date and end date to this function it will tell you how many days are pending or how many days are more. the result will be depending on your hand.

function SafdateDiff($dformat, $endDate, $beginDate){ //send yyyy-mm-dd start and end get the number of days
     $date_parts1=explode($dformat, $beginDate);
     $date_parts2=explode($dformat, $endDate);
     $start_date=gregoriantojd($date_parts1[1], $date_parts1[2],$date_parts1[0]);
     $end_date=gregoriantojd($date_parts2[1], $date_parts2[2],$date_parts2[0]);
     return $end_date - $start_date;
 }

Description:
 I don't think I have to explain this, there is nothing to explain on this. He he.

Author: Safras Ahamed



Comments : What do you think about this news?
No Comments yet.

POST COMMENT
Name
Message
  Post will be visible after admins approval
 

About Maldives Resorts

Members Login
User ID
Password
    Register
Forgot password?

SriLankaWebHosting.com
Just for (Rs.500) $5 per month

Your own domain name, 1GB Space, Unlimited Email Address, Sri Lankan Support & for more info call us.
077-989-5368, 072-829-9077



Terms And Conditions | Link Directory

Join Sri Lanka Banner Exchange | Resources - Free Link Exchange