-// HijriCalendar.cs
+// System.Globalization.HijriCalendar.cs
//
// (C) Ulrich Kunitz 2002
//
using System;
using System.IO;
+using System.Runtime.InteropServices;
/// <summary>
/// </para>
/// </remarks>
[Serializable]
-[MonoTODO ("Fix serialization compatibility with MS.NET")]
+[ComVisible (true)]
+[MonoLimitation ("Serialization format not compatible with .NET")]
public class HijriCalendar : Calendar {
/// <summary>
/// Constructor.
public HijriCalendar() {
M_AbbrEraNames = new string[] {"A.H."};
M_EraNames = new string[] {"Anno Hegirae"};
- if (M_TwoDigitYearMax == 99)
- M_TwoDigitYearMax = 1451;
+ if (twoDigitYearMax == 99)
+ twoDigitYearMax = 1451;
}
/// <summary>
}
}
-#if NET_1_1
- [MonoTODO]
- public int HijriAdjustment {
- get {
- throw new NotImplementedException ();
- }
- set {
- throw new NotImplementedException ();
- }
- }
-#endif
-
- int twoDigitYearMax = 1451;
-
- [MonoTODO ("Add call into operating system")]
+ // FIXME: [MonoTODO ("Add call into operating system")]
public override int TwoDigitYearMax
{
get {
return HijriEra;
}
+ [ComVisible (false)]
+ public override int GetLeapMonth (int year, int era)
+ {
+ return 0;
+ }
+
/// <summary>
/// Overridden. Gives the number of the month of the specified
/// date.
/// is out of range.
/// </exception>
public override DateTime ToDateTime(int year, int month, int day,
- int hour, int minute, int second, int milliseconds,
+ int hour, int minute, int second, int millisecond,
int era)
{
M_CheckYMDE(year, month, day, ref era);
- M_CheckHMSM(hour, minute, second, milliseconds);
+ M_CheckHMSM(hour, minute, second, millisecond);
int rd = CCHijriCalendar.fixed_from_dmy(day, month, year);
return M_ToDateTime(rd,
- hour, minute, second, milliseconds);
+ hour, minute, second, millisecond);
}
- [MonoTODO]
public override int ToFourDigitYear(int year)
{
- throw new NotImplementedException();
+ return base.ToFourDigitYear (year);
}
-#if NET_2_0
+#if !NET_2_1
+ [ComVisible (false)]
public override CalendarAlgorithmType AlgorithmType {
get {
return CalendarAlgorithmType.LunarCalendar;
}
}
+#endif
static DateTime Min = new DateTime (622, 7, 18, 0, 0, 0);
static DateTime Max = new DateTime (9999, 12, 31, 11, 59, 59);
+ [ComVisible (false)]
public override DateTime MinSupportedDateTime {
get {
return Min;
}
}
+ [ComVisible (false)]
public override DateTime MaxSupportedDateTime {
get {
return Max;
}
}
-#endif
+ [MonoTODO ()]
+ public int HijriAdjustment {
+ get { throw new NotImplementedException (); }
+ set { throw new NotImplementedException (); }
+ }
} // class HijriCalendar
} // namespace System.Globalization