示例#1
0
 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);
 }
示例#2
0
 public static LunarDate ToLunarDate(this DateTime d, int timeZone)
 {
     return(LunarYearTools.ConvertSolarToLunar(d, timeZone));
 }
示例#3
0
 public DateTime ToSolarDate(int timeZone)
 {
     return(LunarYearTools.LunarToSolar(this, timeZone));
 }