Code Duplication    Length = 19-19 lines in 2 locations

Sources/Subs-Calendar.php 2 locations

@@ 1398-1416 (lines=19) @@
1395
		$end_string = $end_date_string . (isset($end_time_string) ? ' ' . $end_time_string : '');
1396
1397
	// If some form of string input was given, override individually defined options with it
1398
	if (isset($start_string))
1399
	{
1400
		$start_string_parsed = date_parse($start_string);
1401
		if (empty($start_string_parsed['error_count']) && empty($start_string_parsed['warning_count']))
1402
		{
1403
			if ($start_string_parsed['year'] != false)
1404
			{
1405
				$start_year = $start_string_parsed['year'];
1406
				$start_month = $start_string_parsed['month'];
1407
				$start_day = $start_string_parsed['day'];
1408
			}
1409
			if ($start_string_parsed['hour'] != false)
1410
			{
1411
				$start_hour = $start_string_parsed['hour'];
1412
				$start_minute = $start_string_parsed['minute'];
1413
				$start_second = $start_string_parsed['second'];
1414
			}
1415
		}
1416
	}
1417
	if (isset($end_string))
1418
	{
1419
		$end_string_parsed = date_parse($end_string);
@@ 1417-1435 (lines=19) @@
1414
			}
1415
		}
1416
	}
1417
	if (isset($end_string))
1418
	{
1419
		$end_string_parsed = date_parse($end_string);
1420
		if (empty($end_string_parsed['error_count']) && empty($end_string_parsed['warning_count']))
1421
		{
1422
			if ($end_string_parsed['year'] != false)
1423
			{
1424
				$end_year = $end_string_parsed['year'];
1425
				$end_month = $end_string_parsed['month'];
1426
				$end_day = $end_string_parsed['day'];
1427
			}
1428
			if ($end_string_parsed['hour'] != false)
1429
			{
1430
				$end_hour = $end_string_parsed['hour'];
1431
				$end_minute = $end_string_parsed['minute'];
1432
				$end_second = $end_string_parsed['second'];
1433
			}
1434
		}
1435
	}
1436
1437
	// Validate input
1438
	$start_date_isvalid = checkdate($start_month, $start_day, $start_year);