Code Duplication    Length = 19-19 lines in 2 locations

Sources/Subs-Calendar.php 2 locations

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