WebsiteBaker 2.13.9 is now available!
R.I.P Dietmar (luisehahne) and thank you for all your valuable work for WBhttps://forum.websitebaker.org/index.php/topic,32355.0.html
bday
Calculate total age from birthdate years and days
global $MESSAGE;$output_value ="";$d=trim($d);$datenow=date("Y-m-d");$diff=strtotime($datenow)-strtotime($d);if($diff <0)$diff=$diff * -1; //no negative values$days=floor(($diff)/86400);$years=round(($diff /31536000), 2);//DEBUG//$output_value="$datenow $d Age is $years years. That's $days days";ENG $output_value="Age is $years years. That's $days days";return $output_value;
Use this with [[bday?d=1950-12-31]]You can add this to any place, even in the title of a link or alt text of an image. Also future day possible.
This droplet has invalid PHP code.
I get Code: [Select]This droplet has invalid PHP code.[/color] error.