示例#1
0
        public void AbsoluteDayYearTooLow()
        {
            DateTime calendar = new DateTime(1899, 1, 1);

            try
            {
                HSSFDateUtil.AbsoluteDay(calendar, false);
                Assert.Fail("Should fail here");
            }
            catch (ArgumentException e)
            {
                // expected here
            }

            try
            {
                calendar = new DateTime(1903, 1, 1);
                HSSFDateUtil.AbsoluteDay(calendar, true);
                Assert.Fail("Should fail here");
            }
            catch (ArgumentException e)
            {
                // expected here
            }
        }