Esempio n. 1
0
        //
        public CDate NextSecond()
        {
            CDate d = new CDate(m_Year, m_Month, m_Day);

            d.IncDay();
            return(d);
        }
Esempio n. 2
0
        //
        public CDate PreSecond()
        {
            CDate d = new CDate(m_Year, m_Month, m_Day);

            d.DecDay();
            return(d);
        }
Esempio n. 3
0
        //
        public CDate NextMonth()
        {
            CDate d = new CDate(m_Year, m_Month, m_Day);

            d.IncMonth();
            return(d);
        }
Esempio n. 4
0
        //
        public CDate PreMonth()
        {
            CDate d = new CDate(m_Year, m_Month, m_Day);

            d.DecMonth();
            return(d);
        }
Esempio n. 5
0
        //
        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);
        }
Esempio n. 6
0
        //
        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);
        }
Esempio n. 7
0
        //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;
        }
Esempio n. 8
0
 //
 public long DayDistance(CDate d)
 {
     return(Math.Abs(d.DayOrder() - DayOrder()));
 }
Esempio n. 9
0
 //
 public long MonthDistance(CDate d)
 {
     return(Math.Abs(d.MonthOrder() - MonthOrder()));
 }
Esempio n. 10
0
 //-------------------------------------------------------
 public int YearDistance(CDate d)
 {
     return(Math.Abs(d.m_Year - m_Year));
 }