Code Duplication    Length = 19-19 lines in 2 locations

Sources/Subs-Calendar.php 2 locations

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