@classmethod    
    def isRange(cls, value, minrange, maxrange):
        if not value:
            return False
        value = cls.arg2Arg(value)
        minrange = cls.arg2Arg(minrange)                            # Allow conversion of 'today' or 'infinite'
        maxrange = cls.arg2Arg(maxrange)        
        
        if cls.isDate(value):                                        # Format is date string?

            d = DateTime(date=value)
            thisyear, thismonth, thisday = d.s2date(cls.arg2Arg('today'))    # Get totay for relative calculation
            year, month, day = d.s2date(value)
            
            if cls.isDate(minrange):                                # Minrange is defined as date?
                minyear, minmonth, minday = d.s2date(minrange)
            else:                                                    # Else it be relative number of days instead
                minyear, minmonth, minday = d.futureday(thisyear, thismonth, thisday, number=int(minrange))        

            if cls.isDate(maxrange):
                maxyear, maxmonth, maxday = d.s2date(maxrange)
            else:
                maxyear, maxmonth, maxday = d.futureday(thisyear, thismonth, thisday, number=int(maxrange))        

            if minyear < year < maxyear:                            # Precheck, to avoid the limit in 1970 < mktime < 2040
                return True
            if not (1970 < year < 2040):                            # Can't check other than this interval when using mktime in dating
                return False                                        # when on of the limits is same as range years. False to be sure
                
            # Now we have to check the dates, but still one of the ranges can be outside the 1970 < mktime < 2040 range
            # so we'll crop them on both limits, which is safe because we know that thisyear is already within the limits.
            
            return d.dates2difference((min(2040, max(1970, minyear)), minmonth, minday), (year, month, day)) > 0 and\
                   d.dates2difference((min(2040, max(1970, maxyear)), maxmonth, maxday), (year, month, day)) < 0
        else:
            try:
                if isinstance(minrange, basestring):
                    minrange = float(minrange.replace(',','.'))
                if isinstance(maxrange, basestring):
                    maxrange = float(maxrange.replace(',','.'))
                if isinstance(value, basestring):
                    value = float(value.replace(',','.'))
            except:
                return False  # Any error as with None or string, aswer false

        result = minrange <= value <= maxrange
        return result
Range testing is inclusive on the margins
dataset/ETHPy150Open petrvanblokland/Xierpa3/xierpa3/toolbox/parsers/validator.py/Validator.isRange