Пример #1
0
 private void releasDayd(HostingUnit unit, GuestRequest req)
 {
     for (MyDate temp = Cloning.Clone(req.EntryDate); temp.CompareTo(req.ReleaseDate) != 0; temp.addDays(1))
     {
         unit.Diary[temp] = false;
     }
 }
Пример #2
0
        public int getNumOfDays(MyDate first, MyDate last)
        {
            MyDate temp = Cloning.Clone(first);
            int    i;

            if (last.CompareTo(first) <= 0)//if last<=first
            {
                throw new NoDaysException();
            }
            for (i = 0; temp.CompareTo(last) != 0; i++, temp.addDays(1))
            {
                ;
            }
            return(i);
        }