Welcome to mirror list, hosted at ThFree Co, Russian Federation.

github.com/mono/corert.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEgorBo <egorbo@gmail.com>2018-12-19 16:41:49 +0300
committerMarek Safar <marek.safar@gmail.com>2018-12-19 21:08:44 +0300
commit7e8bf23824b3b95101fb42ad756bbed5eac178bf (patch)
treeb29409ca2a2b7a2918327eda59d12fc10cf06300
parent0e5f123f6b1792bf19fe21143a6d668b6ce8f483 (diff)
fix ISOWeek for mcs
-rw-r--r--src/System.Private.CoreLib/shared/System/Globalization/ISOWeek.cs8
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)
{