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