예제 #1
0
        static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                return;
            }
            var argString = args[0];

            Contract.Assume(argString != null);

            int daysSince1980 = Int32.Parse(args[0]);

            if (daysSince1980 <= 0)
            {
                return;
            }

            int dayInYear;
            int year = ZuneDate.YearSince1980(daysSince1980, out dayInYear);

            string[] days;
            if (DateTime.IsLeapYear(year))
            {
                days = new string[366];
            }
            else
            {
                Contract.Assert(dayInYear <= 365);
                days = new string[365];
            }
            days[dayInYear - 1] = "used";
        }
예제 #2
0
        static void Main(string[] args)
        {
            if (args.Length < 1)
            {
                return;
            }
            var argString = args[0];

            Contract.Assume(argString != null);

            int daysSince1980 = Int32.Parse(args[0]);

            int dayInYear;
            int year = ZuneDate.YearSince1980(daysSince1980, out dayInYear);

            string[] days;
            days = new string[366];

            days[dayInYear] = "used";
        }