Code Duplication    Length = 7-7 lines in 2 locations

web_interface/astpp/system/helpers/date_helper.php 1 location

@@ 281-287 (lines=7) @@
278
			$year = date('Y');
279
		}
280
281
		if ($month == 2)
282
		{
283
			if ($year % 400 == 0 OR ($year % 4 == 0 AND $year % 100 != 0))
284
			{
285
				return 29;
286
			}
287
		}
288
289
		$days_in_month = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
290
		return $days_in_month[$month - 1];

web_interface/astpp/system/libraries/Calendar.php 1 location

@@ 387-393 (lines=7) @@
384
		}
385
386
		// Is the year a leap year?
387
		if ($month == 2)
388
		{
389
			if ($year % 400 == 0 OR ($year % 4 == 0 AND $year % 100 != 0))
390
			{
391
				return 29;
392
			}
393
		}
394
395
		return $days_in_month[$month - 1];
396
	}