using System;
using System.Globalization;
public class SamplesJulianCalendar {
public static void Main() {
JulianCalendar myCal = new JulianCalendar();
for ( int y = 2001; y <= 2005; y++ )
Console.Write( "\t{0}", myCal.IsLeapYear( y, JulianCalendar.CurrentEra ) );
// Checks five years in each of the eras.
for ( int i = 0; i < myCal.Eras.Length; i++ ) {
Console.Write( "Era {0}:\t", myCal.Eras[i] );
for ( int y = 2001; y <= 2005; y++ ){
Console.Write( "\t{0}", myCal.IsLeapYear( y, myCal.Eras[i] ) );
}
}
}
}
|