예제 #1
0
    def getMaxXLimit(self, x_max, data_type):
        """Returns the provided x_max value if the internal x_max value is None. Converts dates to numbers"""
        if self._x_limits[1] is None:
            x_limit = x_max
        else:
            x_limit = self._x_limits[1]

        if not x_limit is None and data_type == "time" and not isinstance(x_limit, time_t):
            x_limit = time_t(long(round(x_limit)))

        return x_limit