summaryrefslogtreecommitdiff
path: root/src/mscorlib/corefx/System/Globalization/JulianCalendar.cs
diff options
context:
space:
mode:
Diffstat (limited to 'src/mscorlib/corefx/System/Globalization/JulianCalendar.cs')
-rw-r--r--src/mscorlib/corefx/System/Globalization/JulianCalendar.cs37
1 files changed, 17 insertions, 20 deletions
diff --git a/src/mscorlib/corefx/System/Globalization/JulianCalendar.cs b/src/mscorlib/corefx/System/Globalization/JulianCalendar.cs
index 6721899ac9..a4277c6d49 100644
--- a/src/mscorlib/corefx/System/Globalization/JulianCalendar.cs
+++ b/src/mscorlib/corefx/System/Globalization/JulianCalendar.cs
@@ -67,17 +67,14 @@ namespace System.Globalization
}
}
- // Return the type of the Julian calendar.
- //
-
- //[System.Runtime.InteropServices.ComVisible(false)]
- //public override CalendarAlgorithmType AlgorithmType
- //{
- // get
- // {
- // return CalendarAlgorithmType.SolarCalendar;
- // }
- //}
+ [System.Runtime.InteropServices.ComVisible(false)]
+ public override CalendarAlgorithmType AlgorithmType
+ {
+ get
+ {
+ return CalendarAlgorithmType.SolarCalendar;
+ }
+ }
public JulianCalendar()
{
@@ -97,7 +94,7 @@ namespace System.Globalization
{
if (era != CurrentEra && era != JulianEra)
{
- throw new ArgumentOutOfRangeException("era", SR.ArgumentOutOfRange_InvalidEraValue);
+ throw new ArgumentOutOfRangeException(nameof(era), SR.ArgumentOutOfRange_InvalidEraValue);
}
}
@@ -107,7 +104,7 @@ namespace System.Globalization
if (year <= 0 || year > MaxYear)
{
throw new ArgumentOutOfRangeException(
- "year",
+ nameof(year),
String.Format(
CultureInfo.CurrentCulture,
SR.ArgumentOutOfRange_Range,
@@ -120,7 +117,7 @@ namespace System.Globalization
{
if (month < 1 || month > 12)
{
- throw new ArgumentOutOfRangeException("month", SR.ArgumentOutOfRange_Month);
+ throw new ArgumentOutOfRangeException(nameof(month), SR.ArgumentOutOfRange_Month);
}
}
@@ -151,7 +148,7 @@ namespace System.Globalization
if (day < 1 || day > monthDays)
{
throw new ArgumentOutOfRangeException(
- "day",
+ nameof(day),
String.Format(
CultureInfo.CurrentCulture,
SR.ArgumentOutOfRange_Range,
@@ -196,7 +193,7 @@ namespace System.Globalization
int[] days = leapYear ? s_daysToMonth366 : s_daysToMonth365;
// All months have less than 32 days, so n >> 5 is a good conservative
// estimate for the month
- int m = n >> 5 + 1;
+ int m = (n >> 5) + 1;
// m = 1-based month number
while (n >= days[m]) m++;
// If month was requested, return it
@@ -223,7 +220,7 @@ namespace System.Globalization
if (months < -120000 || months > 120000)
{
throw new ArgumentOutOfRangeException(
- "months",
+ nameof(months),
String.Format(
CultureInfo.CurrentCulture,
SR.ArgumentOutOfRange_Range,
@@ -383,7 +380,7 @@ namespace System.Globalization
if (millisecond < 0 || millisecond >= MillisPerSecond)
{
throw new ArgumentOutOfRangeException(
- "millisecond",
+ nameof(millisecond),
String.Format(
CultureInfo.CurrentCulture,
SR.ArgumentOutOfRange_Range,
@@ -431,7 +428,7 @@ namespace System.Globalization
{
if (year < 0)
{
- throw new ArgumentOutOfRangeException("year",
+ throw new ArgumentOutOfRangeException(nameof(year),
SR.ArgumentOutOfRange_NeedNonNegNum);
}
Contract.EndContractBlock();
@@ -439,7 +436,7 @@ namespace System.Globalization
if (year > MaxYear)
{
throw new ArgumentOutOfRangeException(
- "year",
+ nameof(year),
String.Format(
CultureInfo.CurrentCulture,
SR.ArgumentOutOfRange_Bounds_Lower_Upper,