Code Duplication    Length = 7-7 lines in 2 locations

languages/Language.php 2 locations

@@ 1290-1296 (lines=7) @@
1287
					$usedYear = true;
1288
					$num = substr( $ts, 0, 4 );
1289
					break;
1290
				case 'xiY':
1291
					$usedIranianYear = true;
1292
					if ( !$iranian ) {
1293
						$iranian = self::tsToIranian( $ts );
1294
					}
1295
					$num = $iranian[0];
1296
					break;
1297
				case 'xmY':
1298
					$usedHijriYear = true;
1299
					if ( !$hijri ) {
@@ 1336-1342 (lines=7) @@
1333
					$usedYear = true;
1334
					$num = substr( $ts, 2, 2 );
1335
					break;
1336
				case 'xiy':
1337
					$usedIranianYear = true;
1338
					if ( !$iranian ) {
1339
						$iranian = self::tsToIranian( $ts );
1340
					}
1341
					$num = substr( $iranian[0], -2 );
1342
					break;
1343
				case 'a':
1344
					$usedAMPM = true;
1345
					$s .= intval( substr( $ts, 8, 2 ) ) < 12 ? 'am' : 'pm';