Exemple #1
0
        public void PosTest3()
        {
            System.Globalization.Calendar tc = new TaiwanCalendar();
            DateTime dt  = tc.MinSupportedDateTime;
            int      era = tc.GetEra(dt);

            Assert.Equal(1, era);
        }
Exemple #2
0
        public void PosTest1()
        {
            System.Globalization.Calendar tc = new TaiwanCalendar();
            Random   rand  = new Random(-55);
            int      year  = rand.Next(tc.MinSupportedDateTime.Year, tc.MaxSupportedDateTime.Year - 1911);
            int      month = rand.Next(1, 12);
            int      day   = rand.Next(1, tc.GetDaysInMonth(year, month) + 1);
            DateTime dt    = new DateTime(year, month, day);
            int      era   = tc.GetEra(dt);

            Assert.Equal(1, era);
        }