fuzzyfields/datetime.py
def _parse_outofbounds(self, value):
        """Deal with dates out of the range supported by pandas.Timestamp

        :param str value:
            YYYY-MM-DD hh:mm:ss
        :returns:
            parsed value depending on self.output
        """
        import numpy
        import pandas

        if self.output == 'pandas':
            # Force to either Timestamp.min or Timestamp.max as of 00:00:00
            # to avoid confusing processes that expects exact days.
            if value < '1677-09-22':
                new_value = '1677-09-22'
            elif value > '2262-04-11':
                new_value = '2262-04-11'
            else:
                assert False

            warnings.warn('Timestamp %s is out of bounds; '
                          'forcing it to %s' % (value, new_value))
            return pandas.to_datetime(new_value)
        elif self.output == 'numpy':
            return numpy.datetime64(value)
        elif self.output == 'datetime':
            return datetime.datetime.strptime(
                value, '%Y-%m-%d %H:%M:%S')
        else:
            return pandas.Period(value).strftime(self.output)
Deal with dates out of the range supported by pandas.Timestamp

        :param str value:
            YYYY-MM-DD hh:mm:ss
        :returns:
            parsed value depending on self.output
        
Deal with dates out of the range supported by pandas.Timestamp
Deal with dates out of the range supported by pandas . Timestamp
def _parse_outofbounds(self, value):
        import numpy
        import pandas
        if self.output == 'pandas':
            if value < '1677-09-22':
                new_value = '1677-09-22'
            elif value > '2262-04-11':
                new_value = '2262-04-11'
            else:
                assert False
            warnings.warn('Timestamp %s is out of bounds; '
                          'forcing it to %s' % (value, new_value))
            return pandas.to_datetime(new_value)
        elif self.output == 'numpy':
            return numpy.datetime64(value)
        elif self.output == 'datetime':
            return datetime.datetime.strptime(
                value, '%Y-%m-%d %H:%M:%S')
        else:
            return pandas.Period(value).strftime(self.output)
def _parse_outofbounds ( self , value ) : import numpy import pandas if self . output == 'pandas' : if value < '1677-09-22' : new_value = '1677-09-22' elif value > '2262-04-11' : new_value = '2262-04-11' else : assert False warnings . warn ( 'Timestamp %s is out of bounds; ' 'forcing it to %s' % ( value , new_value ) ) return pandas . to_datetime ( new_value ) elif self . output == 'numpy' : return numpy . datetime64 ( value ) elif self . output == 'datetime' : return datetime . datetime . strptime ( value , '%Y-%m-%d %H:%M:%S' ) else : return pandas . Period ( value ) . strftime ( self . output )
Deal with dates out of the range supported by pandas.Timestamp
Deal with dates out of the range supported by pandas . Timestamp
"""Deal with dates out of the range supported by pandas.Timestamp

        :param str value:
            YYYY-MM-DD hh:mm:ss
        :returns:
            parsed value depending on self.output
        """ # Force to either Timestamp.min or Timestamp.max as of 00:00:00 # to avoid confusing processes that expects exact days.
parsed value depending on self.output
parsed value depending on self . output
self
value
None