Code Duplication    Length = 19-19 lines in 2 locations

Sources/Subs-Calendar.php 2 locations

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