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