Powered by Ajaxy
Digg StumbleUpon LinkedIn YouTube Flickr Facebook Twitter RSS Reset

Afficher la liste des années bissextiles

 date
{filelink=15256}

<?php
  function estElleBissextile($annee)
  {
    $dth = strtotime("$annee-01-01");
    return date('L', $dth);
  }

  for($i = 1980; $i <= 2050; $i++)
  {
    $chaine = "$i ";
    if( !estElleBissextile($i) )
      $chaine .= "est ";
      else
       $chaine .= "n'est pas ";
    $chaine .= "une année bissextille.<br />";

    echo $chaine;
  }
?>

No comments yet.

Leave a Comment