Пример #1
0
        public NepaliDate AddMonths(int months)
        {
            DateTime dt = DateConvertor.GetEnglishDate(this.ToString());

            dt = dt.AddMonths(months);
            return(DateConvertor.GetNepaliDate(dt));
        }
Пример #2
0
        public NepaliDate AddYears(int years)
        {
            DateTime dt = DateConvertor.GetEnglishDate(this.ToString());

            dt = dt.AddYears(years);
            return(DateConvertor.GetNepaliDate(dt));
        }
Пример #3
0
        public int CompareTo(NepaliDate other)
        {
            DateTime engOther = DateConvertor.GetEnglishDate(other.ToString());

            DateTime engThis = DateConvertor.GetEnglishDate(this.ToString());

            return(engThis.CompareTo(engOther));
        }
Пример #4
0
        private void calc()
        {
            DaysInMonth = DateConvertor.GetDaysInNepaliMoth(Year, Month);
            NepaliDate np = new NepaliDate(Year, Month, 1);

            StartDate = DateConvertor.GetEnglishDate(np.ToString());
            np.Day    = DaysInMonth;
            EndDate   = DateConvertor.GetEnglishDate(np.ToString());
        }