Code Duplication    Length = 19-19 lines in 2 locations

Sources/Subs-Calendar.php 2 locations

@@ 1328-1346 (lines=19) @@
1325
		$end_string = $end_date_string . (isset($end_time_string) ? ' ' . $end_time_string : '');
1326
1327
	// If some form of string input was given, override individually defined options with it
1328
	if (isset($start_string))
1329
	{
1330
		$start_string_parsed = date_parse($start_string);
1331
		if (empty($start_string_parsed['error_count']) && empty($start_string_parsed['warning_count']))
1332
		{
1333
			if ($start_string_parsed['year'] != false)
1334
			{
1335
				$start_year = $start_string_parsed['year'];
1336
				$start_month = $start_string_parsed['month'];
1337
				$start_day = $start_string_parsed['day'];
1338
			}
1339
			if ($start_string_parsed['hour'] != false)
1340
			{
1341
				$start_hour = $start_string_parsed['hour'];
1342
				$start_minute = $start_string_parsed['minute'];
1343
				$start_second = $start_string_parsed['second'];
1344
			}
1345
		}
1346
	}
1347
	if (isset($end_string))
1348
	{
1349
		$end_string_parsed = date_parse($end_string);
@@ 1347-1365 (lines=19) @@
1344
			}
1345
		}
1346
	}
1347
	if (isset($end_string))
1348
	{
1349
		$end_string_parsed = date_parse($end_string);
1350
		if (empty($end_string_parsed['error_count']) && empty($end_string_parsed['warning_count']))
1351
		{
1352
			if ($end_string_parsed['year'] != false)
1353
			{
1354
				$end_year = $end_string_parsed['year'];
1355
				$end_month = $end_string_parsed['month'];
1356
				$end_day = $end_string_parsed['day'];
1357
			}
1358
			if ($end_string_parsed['hour'] != false)
1359
			{
1360
				$end_hour = $end_string_parsed['hour'];
1361
				$end_minute = $end_string_parsed['minute'];
1362
				$end_second = $end_string_parsed['second'];
1363
			}
1364
		}
1365
	}
1366
1367
	// Validate input
1368
	$start_date_isvalid = checkdate($start_month, $start_day, $start_year);