Code Duplication    Length = 19-19 lines in 2 locations

Sources/Subs-Calendar.php 2 locations

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