Code Duplication    Length = 19-19 lines in 2 locations

Sources/Subs-Calendar.php 2 locations

@@ 1381-1399 (lines=19) @@
1378
		$end_string = $end_date_string . (isset($end_time_string) ? ' ' . $end_time_string : '');
1379
1380
	// If some form of string input was given, override individually defined options with it
1381
	if (isset($start_string))
1382
	{
1383
		$start_string_parsed = date_parse($start_string);
1384
		if (empty($start_string_parsed['error_count']) && empty($start_string_parsed['warning_count']))
1385
		{
1386
			if ($start_string_parsed['year'] != false)
1387
			{
1388
				$start_year = $start_string_parsed['year'];
1389
				$start_month = $start_string_parsed['month'];
1390
				$start_day = $start_string_parsed['day'];
1391
			}
1392
			if ($start_string_parsed['hour'] != false)
1393
			{
1394
				$start_hour = $start_string_parsed['hour'];
1395
				$start_minute = $start_string_parsed['minute'];
1396
				$start_second = $start_string_parsed['second'];
1397
			}
1398
		}
1399
	}
1400
	if (isset($end_string))
1401
	{
1402
		$end_string_parsed = date_parse($end_string);
@@ 1400-1418 (lines=19) @@
1397
			}
1398
		}
1399
	}
1400
	if (isset($end_string))
1401
	{
1402
		$end_string_parsed = date_parse($end_string);
1403
		if (empty($end_string_parsed['error_count']) && empty($end_string_parsed['warning_count']))
1404
		{
1405
			if ($end_string_parsed['year'] != false)
1406
			{
1407
				$end_year = $end_string_parsed['year'];
1408
				$end_month = $end_string_parsed['month'];
1409
				$end_day = $end_string_parsed['day'];
1410
			}
1411
			if ($end_string_parsed['hour'] != false)
1412
			{
1413
				$end_hour = $end_string_parsed['hour'];
1414
				$end_minute = $end_string_parsed['minute'];
1415
				$end_second = $end_string_parsed['second'];
1416
			}
1417
		}
1418
	}
1419
1420
	// Validate input
1421
	$start_date_isvalid = checkdate($start_month, $start_day, $start_year);