code: def setDuration(self, duration):
          
          if duration < 1:
              return False
          
          self.setDateEnd(self.dateStart().addDays(duration - 1))
          return True
docs: Sets the duration for this item to the inputed duration.
          
          :param      duration | <int>