# Path: httoop/exceptions.py
# class InvalidDate(Invalid):
# 	u"""error raised when Date is invalid"""
# 
# Path: httoop/meta.py
# class HTTPSemantic(type):
# 	u"""Implements the HTTP Semantic interface"""
# 
# 	def __new__(mcs, name, bases, dict_):
# 		bases = list(bases)
# 		if object in bases:
# 			bases.remove(object)
# 		bases.append(Semantic)
# 
# 		# python 2/3 unifying
# 		if '__bool__' in dict_ or '__nonzero__' in dict_:
# 			dict_.setdefault('__bool__', dict_.get('__nonzero__'))
# 			dict_.setdefault('__nonzero__', dict_.get('__bool__'))
# 
# 		return super(HTTPSemantic, mcs).__new__(mcs, name, tuple(bases), dict_)
# 
# Path: httoop/six.py

# 
# Path: httoop/util.py
# PY3 = sys.version_info[0] == 3
# KNOWN_ENCODINGS = {
# 	'cp1254', 'cp949', 'cp865', 'cp1257', 'euc_jp', 'cp1250', 'mac-cyrillic', 'mac-latin2', 'cp866', 'cp857',
# 	'tis-620', 'hp-roman8', 'iso8859-15', 'iso8859-1', 'mac-turkish', 'utf-32', 'cp1252', 'cp861', 'euc_jis_2004',
# 	'iso8859-6', 'utf-7', 'gb18030', 'iso2022_kr', 'shift_jisx0213', 'shift_jis_2004', 'utf-32-be', 'cp855',
# 	'utf-8', 'iso8859-2', 'koi8-r', 'iso8859-14', 'cp1251', 'iso8859-11', 'cp424', 'ascii', 'euc_jisx0213',
# 	'cp863', 'iso2022_jp_ext', 'euc_kr', 'iso2022_jp_2004', 'cp869', 'gb2312', 'utf-16', 'utf-32-le', 'mac-roman',
# 	'iso8859-10', 'uu', 'iso2022_jp', 'johab', 'cp950', 'cp852', 'iso2022_jp_2', 'iso8859-8', 'cp775', 'shift_jis',
# 	'utf-16-be', 'cp1255', 'cp1253', 'mac-iceland', 'utf-16-le', 'cp437', 'cp864', 'cp1258', 'cp862', 'cp860',
# 	'cp850', 'gbk', 'cp858', 'iso8859-3', 'iso8859-4', 'mac-greek', 'iso2022_jp_1', 'ptcp154', 'iso8859-7',
# 	'iso8859-5', 'cp500', 'iso8859-13', 'iso8859-9', 'cp1256', 'iso8859-16', 'cp932', 'iso2022_jp_3'
# }
# def _(x):
# def sanitize_encoding(encoding):
# def iteritems(d, **kw):
# def to_unicode(string):
# def if_has(func):
# 	def _decorated(self, *args, **kwargs):
# def integer(number, *args):
# 	def name(self):
# 	def close(self):
# 	def flush(self):
# 	def read(self, *size):
# 	def readline(self, *size):
# 	def readlines(self, *size):
# 	def write(self, bytes_):
# 	def writelines(self, sequence_of_strings):
# 	def seek(self, offset, whence=0):
# 	def tell(self):
# 	def truncate(self, size=None):
# 	def formatkey(key):
# 	def formatvalue(value):
# 	def __init__(self, *args, **kwargs):
# 	def __getitem__(self, key):
# 	def __setitem__(self, key, value):
# 	def __delitem__(self, key):
# 	def __contains__(self, key):
# 	def get(self, key, default=None):
# 	def update(self, E):
# 	def setdefault(self, key, x=None):
# 	def pop(self, key, default=None):
# 	def fromkeys(cls, seq, value=None):
# 	def formatkey(key):
# 	def __init__(self, message, *args, **kwargs):
# 	def translate(self):
# 	def __unicode__(self):
# 	def __bytes__(self):
# class IFile(object):
# class CaseInsensitiveDict(dict):
# class ByteUnicodeDict(CaseInsensitiveDict):
# class _Translateable(object):


import locale
import time
from datetime import datetime
from httoop.exceptions import InvalidDate
from httoop.meta import HTTPSemantic
from httoop.six import with_metaclass
from httoop.util import Unicode, _, parsedate

	def __float__(self):
		return float(self.__timestamp)

	def __eq__(self, other):
		try:
			return int(self) == int(self.__other(other))
		except NotImplementedError:  # pragma: no cover
			return NotImplemented

	def __gt__(self, other):
		try:
			return int(self) > int(self.__other(other))
		except NotImplementedError:  # pragma: no cover
			return NotImplemented

	def __lt__(self, other):
		try:
			return int(self) < int(self.__other(other))
		except NotImplementedError:  # pragma: no cover
			return NotImplemented

	def __other(self, other):
		if other is None:
			return Date(0)
			raise NotImplementedError()  # pragma: no cover
		if isinstance(other, Date):
			return other
		try:
			return Date(other)

# Path: httoop/exceptions.py
# class InvalidDate(Invalid):
# 	u"""error raised when Date is invalid"""
# 
# Path: httoop/meta.py
# class HTTPSemantic(type):
# 	u"""Implements the HTTP Semantic interface"""
# 
# 	def __new__(mcs, name, bases, dict_):
# 		bases = list(bases)
# 		if object in bases:
# 			bases.remove(object)
# 		bases.append(Semantic)
# 
# 		# python 2/3 unifying
# 		if '__bool__' in dict_ or '__nonzero__' in dict_:
# 			dict_.setdefault('__bool__', dict_.get('__nonzero__'))
# 			dict_.setdefault('__nonzero__', dict_.get('__bool__'))
# 
# 		return super(HTTPSemantic, mcs).__new__(mcs, name, tuple(bases), dict_)
# 
# Path: httoop/six.py

# 
# Path: httoop/util.py
# PY3 = sys.version_info[0] == 3
# KNOWN_ENCODINGS = {
# 	'cp1254', 'cp949', 'cp865', 'cp1257', 'euc_jp', 'cp1250', 'mac-cyrillic', 'mac-latin2', 'cp866', 'cp857',
# 	'tis-620', 'hp-roman8', 'iso8859-15', 'iso8859-1', 'mac-turkish', 'utf-32', 'cp1252', 'cp861', 'euc_jis_2004',
# 	'iso8859-6', 'utf-7', 'gb18030', 'iso2022_kr', 'shift_jisx0213', 'shift_jis_2004', 'utf-32-be', 'cp855',
# 	'utf-8', 'iso8859-2', 'koi8-r', 'iso8859-14', 'cp1251', 'iso8859-11', 'cp424', 'ascii', 'euc_jisx0213',
# 	'cp863', 'iso2022_jp_ext', 'euc_kr', 'iso2022_jp_2004', 'cp869', 'gb2312', 'utf-16', 'utf-32-le', 'mac-roman',
# 	'iso8859-10', 'uu', 'iso2022_jp', 'johab', 'cp950', 'cp852', 'iso2022_jp_2', 'iso8859-8', 'cp775', 'shift_jis',
# 	'utf-16-be', 'cp1255', 'cp1253', 'mac-iceland', 'utf-16-le', 'cp437', 'cp864', 'cp1258', 'cp862', 'cp860',
# 	'cp850', 'gbk', 'cp858', 'iso8859-3', 'iso8859-4', 'mac-greek', 'iso2022_jp_1', 'ptcp154', 'iso8859-7',
# 	'iso8859-5', 'cp500', 'iso8859-13', 'iso8859-9', 'cp1256', 'iso8859-16', 'cp932', 'iso2022_jp_3'
# }
# def _(x):
# def sanitize_encoding(encoding):
# def iteritems(d, **kw):
# def to_unicode(string):
# def if_has(func):
# 	def _decorated(self, *args, **kwargs):
# def integer(number, *args):
# 	def name(self):
# 	def close(self):
# 	def flush(self):
# 	def read(self, *size):
# 	def readline(self, *size):
# 	def readlines(self, *size):
# 	def write(self, bytes_):
# 	def writelines(self, sequence_of_strings):
# 	def seek(self, offset, whence=0):
# 	def tell(self):
# 	def truncate(self, size=None):
# 	def formatkey(key):
# 	def formatvalue(value):
# 	def __init__(self, *args, **kwargs):
# 	def __getitem__(self, key):
# 	def __setitem__(self, key, value):
# 	def __delitem__(self, key):
# 	def __contains__(self, key):
# 	def get(self, key, default=None):
# 	def update(self, E):
# 	def setdefault(self, key, x=None):
# 	def pop(self, key, default=None):
# 	def fromkeys(cls, seq, value=None):
# 	def formatkey(key):
# 	def __init__(self, message, *args, **kwargs):
# 	def translate(self):
# 	def __unicode__(self):
# 	def __bytes__(self):
# class IFile(object):
# class CaseInsensitiveDict(dict):
# class ByteUnicodeDict(CaseInsensitiveDict):
# class _Translateable(object):


# Path: httoop/date.py
import locale
import time
from datetime import datetime
from httoop.exceptions import InvalidDate
from httoop.meta import HTTPSemantic
from httoop.six import with_metaclass
from httoop.util import Unicode, _, parsedate


	def __float__(self):
		return float(self.__timestamp)

	def __eq__(self, other):
		try:
			return int(self) == int(self.__other(other))
		except NotImplementedError:  # pragma: no cover
			return NotImplemented

	def __gt__(self, other):
		try:
			return int(self) > int(self.__other(other))
		except NotImplementedError:  # pragma: no cover
			return NotImplemented

	def __lt__(self, other):
		try:
			return int(self) < int(self.__other(other))
		except NotImplementedError:  # pragma: no cover
			return NotImplemented

	def __other(self, other):
		if other is None:
			return Date(0)
			raise NotImplementedError()  # pragma: no cover
		if isinstance(other, Date):
			return other
		try:
			return Date(other)

		except (InvalidDate, TypeError):