diff options
author | EgorBo <egorbo@gmail.com> | 2018-12-19 16:41:49 +0300 |
---|---|---|
committer | Marek Safar <marek.safar@gmail.com> | 2018-12-19 21:08:44 +0300 |
commit | 7e8bf23824b3b95101fb42ad756bbed5eac178bf (patch) | |
tree | b29409ca2a2b7a2918327eda59d12fc10cf06300 | |
parent | 0e5f123f6b1792bf19fe21143a6d668b6ce8f483 (diff) |
fix ISOWeek for mcs
-rw-r--r-- | src/System.Private.CoreLib/shared/System/Globalization/ISOWeek.cs | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/System.Private.CoreLib/shared/System/Globalization/ISOWeek.cs b/src/System.Private.CoreLib/shared/System/Globalization/ISOWeek.cs index 3b3ba15ec..27c163de1 100644 --- a/src/System.Private.CoreLib/shared/System/Globalization/ISOWeek.cs +++ b/src/System.Private.CoreLib/shared/System/Globalization/ISOWeek.cs @@ -89,8 +89,12 @@ namespace System.Globalization { throw new ArgumentOutOfRangeException(nameof(year), SR.ArgumentOutOfRange_Year); } - - int P(int y) => (y + (y / 4) - (y / 100) + (y / 400)) % 7; +#if __MonoCS__ // mcs doesn't support local funtions + Func<int, int> P = y => +#else + int P(int y) => +#endif + (y + (y / 4) - (y / 100) + (y / 400)) % 7; if (P(year) == 4 || P(year - 1) == 3) { |