// public CDate NextSecond() { CDate d = new CDate(m_Year, m_Month, m_Day); d.IncDay(); return(d); }
// public CDate PreSecond() { CDate d = new CDate(m_Year, m_Month, m_Day); d.DecDay(); return(d); }
// public CDate NextMonth() { CDate d = new CDate(m_Year, m_Month, m_Day); d.IncMonth(); return(d); }
// public CDate PreMonth() { CDate d = new CDate(m_Year, m_Month, m_Day); d.DecMonth(); return(d); }
// public CDate NextSecond(int n) { CDate d = new CDate(m_Year, m_Month, m_Day); for (int i = 0; i < n; i++) { d.IncDay(); } return(d); }
// public CDate PreMonth(int n) { CDate d = new CDate(m_Year, m_Month, m_Day); for (int i = 0; i < n; i++) { d.DecMonth(); } return(d); }
//Ham dung co 1 doi so kieu CDate public CDate(CDate d) { if (IsLeapYear(d.m_Year)) { NgayThang[2] = 29; } this.m_Year = d.m_Year; this.m_Month = d.m_Month; this.m_Day = d.m_Day; }
// public long DayDistance(CDate d) { return(Math.Abs(d.DayOrder() - DayOrder())); }
// public long MonthDistance(CDate d) { return(Math.Abs(d.MonthOrder() - MonthOrder())); }
//------------------------------------------------------- public int YearDistance(CDate d) { return(Math.Abs(d.m_Year - m_Year)); }