예제 #1
0
        private void readCurrentDate(string dateStr)
        {
            string[] dateItems  = dateStr.Split(' ');
            int      season     = Int32.Parse(dateItems[2]);
            int      attilaYear = Int32.Parse(dateItems[3]);
            int      month      = DateConverter.convertSeason(season);
            //If I manage to shift back the startdate.
            int ck2Year = 395 + (attilaYear - 1147);

            this.currentAttilaDate = new DateTime(attilaYear, month, 1);
        }
예제 #2
0
        public DateTime convertDate(string dateStr)
        {
            string[] dateItems  = dateStr.Split(' ');
            int      season     = Int32.Parse(dateItems[2]);
            int      attilaYear = Int32.Parse(dateItems[3]);
            int      month      = DateConverter.convertSeason(season);
            int      year       = 769 + (attilaYear - currentAttilaDate.Year);

            if (attilaYear == 0)
            {
                return(new DateTime(1, 1, 1));
            }
            DateTime dt = new DateTime(year, month, 2);

            return(dt);
        }