Ejemplo n.º 1
0
        private void ShowInfo(int todayId)
        {
            Calendar  calendar  = monthArr[todayId];
            LunarDate lunarDate = calendar.LunarDate;

            txtInfo.Text  = lunarDate.ToString(true);
            txtInfo.Text += "\n\n" + calendar;
        }
Ejemplo n.º 2
0
        public void TestCalendar()
        {
            LunarDate lunar = new LunarDate();

            Assert.AreEqual(lunar.GetLunarData(LunarDate.LunarDataType.SEXAGENARYYEAR, 59), "癸亥");
        }
Ejemplo n.º 3
0
        public static string ConvertToIslamic(DateTime dateTime, string mod = "")
        {
            LunarDate lunar = Calendar.ConvertToIslamic(dateTime);

            return(string.IsNullOrEmpty(mod) ? lunar.ToString() : lunar.ToString(mod));
        }