Example #1
0
function findDay($year)
{
    //$year = 2003;
    $count = 0;
    if ($year >= 2001) {
        for ($i = 2001; $i <= $year; $i++) {
            if (isLeap($i)) {
                $count += 2;
            } else {
                $count += 1;
            }
        }
        global $order;
        $order = "right";
        return $count;
    } else {
        for ($i = 2001; $i >= $year; $i--) {
            if (isLeap($i)) {
                $count += 2;
            } else {
                $count += 1;
            }
        }
        global $order;
        $order = "left";
        return $count;
    }
}
 public function testFourthCentury()
 {
     $this->assertTrue(isLeap(2400));
 }
Example #3
0
 public function testFourthCentury()
 {
     // $this->markTestSkipped();
     $this->assertTrue(isLeap(2400));
 }