public LunarDate(int day, int month, int year, bool leap, DateTime solarDate)
 {
     Day          = day;
     Month        = month;
     Year         = year;
     IsLeapYear   = leap;
     SolarDate    = solarDate;
     Ganzhi_Day   = LunarYearTools.GetGanzhiOfSolarDay(solarDate.Day, solarDate.Month, solarDate.Year);
     Ganzhi_Month = LunarYearTools.GetGanzhiOfMonth(month, year);
     Ganzhi_Year  = LunarYearTools.GetGanzhiOfYear(year);
 }
Beispiel #2
0
 public static LunarDate ToLunarDate(this DateTime d, int timeZone)
 {
     return(LunarYearTools.ConvertSolarToLunar(d, timeZone));
 }
 public DateTime ToSolarDate(int timeZone)
 {
     return(LunarYearTools.LunarToSolar(this, timeZone));
 }