Code Duplication    Length = 19-19 lines in 2 locations

Sources/Subs-Calendar.php 2 locations

@@ 1279-1297 (lines=19) @@
1276
		$end_string = $end_date_string . (isset($end_time_string) ? ' ' . $end_time_string : '');
1277
1278
	// If some form of string input was given, override individually defined options with it
1279
	if (isset($start_string))
1280
	{
1281
		$start_string_parsed = date_parse($start_string);
1282
		if (empty($start_string_parsed['error_count']) && empty($start_string_parsed['warning_count']))
1283
		{
1284
			if ($start_string_parsed['year'] != false)
1285
			{
1286
				$start_year = $start_string_parsed['year'];
1287
				$start_month = $start_string_parsed['month'];
1288
				$start_day = $start_string_parsed['day'];
1289
			}
1290
			if ($start_string_parsed['hour'] != false)
1291
			{
1292
				$start_hour = $start_string_parsed['hour'];
1293
				$start_minute = $start_string_parsed['minute'];
1294
				$start_second = $start_string_parsed['second'];
1295
			}
1296
		}
1297
	}
1298
	if (isset($end_string))
1299
	{
1300
		$end_string_parsed = date_parse($end_string);
@@ 1298-1316 (lines=19) @@
1295
			}
1296
		}
1297
	}
1298
	if (isset($end_string))
1299
	{
1300
		$end_string_parsed = date_parse($end_string);
1301
		if (empty($end_string_parsed['error_count']) && empty($end_string_parsed['warning_count']))
1302
		{
1303
			if ($end_string_parsed['year'] != false)
1304
			{
1305
				$end_year = $end_string_parsed['year'];
1306
				$end_month = $end_string_parsed['month'];
1307
				$end_day = $end_string_parsed['day'];
1308
			}
1309
			if ($end_string_parsed['hour'] != false)
1310
			{
1311
				$end_hour = $end_string_parsed['hour'];
1312
				$end_minute = $end_string_parsed['minute'];
1313
				$end_second = $end_string_parsed['second'];
1314
			}
1315
		}
1316
	}
1317
1318
	// Validate input
1319
	$start_date_isvalid = checkdate($start_month, $start_day, $start_year);