System.Globalization.TaiwanLunisolarCalendar.GetYear C# (CSharp) Method

GetYear() private method

private GetYear ( int year, System.DateTime time ) : int
year int
time System.DateTime
return int
        internal override int GetYear(int year, DateTime time) {
            return helper.GetYear(year, time);
        }

Usage Example

        public void TestDay()
        {
            TaiwanLunisolarCalendar tlc = new TaiwanLunisolarCalendar();

            int year = tlc.GetYear(DateTime.Now);
            int month = tlc.GetMonth(DateTime.Now);
            int day = tlc.GetDayOfMonth(DateTime.Now);

            string aa = string.Format("{0}/{1}/{2}", year, month, day);
            Console.WriteLine("day = " + aa);

            DateTime date2 = tlc.ToDateTime(year, month, day, 0, 0, 0, 0);
            Console.WriteLine("day2 = " + date2.ToShortDateString());
        }
All Usage Examples Of System.Globalization.TaiwanLunisolarCalendar::GetYear