Code Duplication    Length = 2-2 lines in 2 locations

main/inc/lib/blog.lib.php 1 location

@@ 2313-2314 (lines=2) @@
2310
		//Handle leap year
2311
		$numberofdays = array (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
2312
2313
		if(($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0))
2314
			$numberofdays[2] = 29;
2315
2316
		//Get the first day of the month
2317
		$dayone = getdate(mktime(0, 0, 0, $month, 1, $year));

main/inc/lib/agenda.lib.php 1 location

@@ 3124-3125 (lines=2) @@
3121
        global $DaysShort, $course_path;
3122
        //Handle leap year
3123
        $numberofdays = array (0, 31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
3124
        if (($year % 400 == 0) or ($year % 4 == 0 and $year % 100 <> 0))
3125
            $numberofdays[2] = 29;
3126
        //Get the first day of the month
3127
        $dayone = getdate(mktime(0, 0, 0, $month, 1, $year));
3128
        //Start the week on monday