code: def inc(self, source, month=None, year=None):
          
          yr = source.year
          mth = source.month
          dy = source.day
  
          try:
              month = float(month)
          except (TypeError, ValueError):
              month = 0
  
          try:
              year = float(year)
          except (TypeError, ValueError):
              year = 0
          finally:
              month += year * 12
              year = 0
  
          subMi = 0.0
          maxDay = 0
          if month:
              mi = int(month)
              subMi = month - mi
  
              y = int(mi / 12.0)
              m = mi - y * 12
  
              mth = mth + m
              if mth < 1:  # cross start-of-year?
                  y -= 1  # yes - decrement year
                  mth += 12  # and fix month
              elif mth > 12:  # cross end-of-year?
                  y += 1  # yes - increment year
                  mth -= 12  # and fix month
  
              yr += y
  
              # if the day ends up past the last day of
              # the new month, set it to the last day
              maxDay = self.ptc.daysInMonth(mth, yr)
              if dy > maxDay:
                  dy = maxDay
  
          if yr > datetime.MAXYEAR or yr < datetime.MINYEAR:
              raise OverflowError('year is out of range')
  
          d = source.replace(year=yr, month=mth, day=dy)
          if subMi:
              d += datetime.timedelta(days=subMi * maxDay)
          return source + (d - source)
docs: Takes the given C{source} date, or current date if none is
          passed, and increments it according to the values passed in
          by month and/or year.
  
          This routine is needed because Python's C{timedelta()} function
          does not allow for month or year increments.
  
          @type  source: struct_time
          @param source: C{struct_time} value to increment
          @type  month:  float or integer
          @param month:  optional number of months to increment
          @type  year:   float or integer
          @param year:   optional number of years to increment
  
          @rtype:  datetime
          @return: C{source} incremented by the number of months and/or years