Results 1 to 1 of 1

Thread: PHP program code to calculate simple leap year

  1. #1
    Join Date
    Dec 2014
    Posts
    4

    Default PHP program code to calculate simple leap year

    Get the PHP program code to calculate simple leap year
    Code:
       <?php
        for($count=0; $count<16; $count++)
        {
            $day = date("d", mktime(0, 0, 0, 2, 29, date("Y")+$count));
            if($day == 29)
            {
                $year = date("Y")+$count;
                echo "<p>The next leap year is 29th February $year</p><br>";
            }
        }
    ?>
    Source : Simple leap year Calculator - Easycalculation
    Last edited by Imran; 03-17-2015 at 03:48 PM. Reason: Had Major Errors in Terms of What is allowed and What is not Allowed

Tags for this Thread

Bookmarks

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •