// (C) Ulrich Kunitz 2002
//
+//
+// Copyright (C) 2004 Novell, Inc (http://www.novell.com)
+//
+// Permission is hereby granted, free of charge, to any person obtaining
+// a copy of this software and associated documentation files (the
+// "Software"), to deal in the Software without restriction, including
+// without limitation the rights to use, copy, modify, merge, publish,
+// distribute, sublicense, and/or sell copies of the Software, and to
+// permit persons to whom the Software is furnished to do so, subject to
+// the following conditions:
+//
+// The above copyright notice and this permission notice shall be
+// included in all copies or substantial portions of the Software.
+//
+// THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND,
+// EXPRESS OR IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF
+// MERCHANTABILITY, FITNESS FOR A PARTICULAR PURPOSE AND
+// NONINFRINGEMENT. IN NO EVENT SHALL THE AUTHORS OR COPYRIGHT HOLDERS BE
+// LIABLE FOR ANY CLAIM, DAMAGES OR OTHER LIABILITY, WHETHER IN AN ACTION
+// OF CONTRACT, TORT OR OTHERWISE, ARISING FROM, OUT OF OR IN CONNECTION
+// WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE SOFTWARE.
+//
+
namespace System.Globalization {
using System;
public abstract class Calendar {
/// <value>An protected integer property that gives the number of
/// days in a week. It might be overridden.</value>
- protected virtual int M_DaysInWeek
+ internal virtual int M_DaysInWeek
{
get { return 7; }
}
/// <returns>The string used in the
/// <see cref="T:System.ArgumentOutOfRangeException"/>
/// </returns>
- protected string M_ValidValues(object a, object b)
+ internal string M_ValidValues(object a, object b)
{
StringWriter sw = new StringWriter();
sw.Write("Valid values are between {0} and {1}, inclusive.",
/// The exception is thrown, if the <paramref name="arg"/> is outside
/// the allowed range.
/// </exception>
- protected void M_ArgumentInRange(string param, int arg, int a, int b)
+ internal void M_ArgumentInRange(string param, int arg, int a, int b)
{
if (a <= arg && arg <= b)
return;
/// The Exception is thrown, if one of the parameter is outside the
/// allowed the range.
/// </exception>
- protected void M_CheckHMSM(int hour, int minute, int second,
+ internal void M_CheckHMSM(int hour, int minute, int second,
int milliseconds)
{
M_ArgumentInRange("hour", hour, 0, 23);
/// <see cref="P:TwoDigitYearMax"/>
/// property.
/// </summary>
- protected int M_TwoDigitYearMax;
+ internal int M_TwoDigitYearMax;
/// <summary>
/// Get-only property returing the maximum allowed year for this
/// class.
/// </value>
- protected virtual int M_MaxYear {
+ internal virtual int M_MaxYear {
get {
if (M_MaxYearValue == 0) {
M_MaxYearValue = GetYear(DateTime.MaxValue);
/// <exception cref="T:ArgumentOutOfRangeException">
/// The exception will be thrown, if the year is not valid.
/// </exception>
- protected abstract void M_CheckYE(int year, ref int era);
+ internal abstract void M_CheckYE(int year, ref int era);
/// <value>
/// <para>The property gives the maximum value for years with two
/// <returns>An integer that represents the difference of days
/// between <paramref name="timeA"/> and <paramref name="timeB"/>.
/// </returns>
- protected int M_DiffDays(DateTime timeA, DateTime timeB) {
+ internal int M_DiffDays(DateTime timeA, DateTime timeB) {
long diff = timeA.Ticks - timeB.Ticks;
if (diff >= 0) {
/// <returns>The <see cref="T:System.DateTime"/> representing
/// the first day of the second week of the year.
/// </returns>
- protected DateTime M_GetFirstDayOfSecondWeekOfYear(
+ internal DateTime M_GetFirstDayOfSecondWeekOfYear(
int year, CalendarWeekRule rule, DayOfWeek firstDayOfWeek)
{
DateTime d1 = ToDateTime(year, 1, 1, 0, 0, 0, 0);
/// <summary>Protected field storing the abbreviated era names.
/// </summary>
- protected string[] M_AbbrEraNames;
+ internal string[] M_AbbrEraNames;
/// <summary>Protected field storing the era names.
/// </summary>
- protected string[] M_EraNames;
+ internal string[] M_EraNames;
/// <value>
/// The property stores the era names. It might be overwritten by