Coder Profile - Show off your skills, get a coder profile.
 
 
 
code pin board find age function Download Source Code
Author Details Code Information
Skepsis ( Matt )

Pinned 4 Codes
Posted 0 Coding Articles

Send A Message
View Coders Profile
Language PHP (Hypertext Preprocessor)
Expires Never
Length 466 Characters (18 Lines)
Password no password
Description

generates the date into the age
  1. ////////////////////////////////////////////////////////
  2. // Function: find_age
  3. // Description: Find age
  4.  
  5. function find_age($age,$surplus=false)
  6. {
  7.           if(!$age == NULL)
  8.           {
  9.                     if(!$surplus) $diff = (date("Y") - date("Y",$age));
  10.                     else $diff = ((date("Y") + $surplus) - date("Y",$age));
  11.  
  12.                     if (mktime(0,0,0,date("m",$age),date("j",$age),date("Y")) <= time()) $finish = $diff;
  13.                     else $finish = $diff - 1;
  14.           }
  15.           else $finish = NULL;
  16.  
  17. return $finish;
  18. }
code pin board Back To Code Pin Board Post New Code
Please login to post comments.
Page 1 of 1
 
 
Part of the MyPingle Network
Development Blog :: Make A Donation :: Contact Me
Terms & Conditions :: Privacy Policy :: Documents
Version 1.44.00
Copyright © 2007 - 2008, Scott Thompson, All Rights Reserved