A lazy method to parse anything to date.
        
        Usage::
        
            >>> from weatherlab.lib.timelib.timewrapper import timewrapper
            >>> from datetime import datetime
            >>> timewrapper.parse_date("12/25/1985")
            datetime.date(1985, 12, 25)
            >>> timewrapper.parse_date(725000)
            datetime.date(1985, 12, 25)
            >>> timewrapper.parse_date(datetime(1985, 12, 25, 8, 30))
            datetime.date(1985, 12, 25)

def parse_date(self, value):
        """A lazy method to parse anything to date.
        
        Usage::
        
            >>> from weatherlab.lib.timelib.timewrapper import timewrapper
            >>> from datetime import datetime
            >>> timewrapper.parse_date("12/25/1985")
            datetime.date(1985, 12, 25)
            >>> timewrapper.parse_date(725000)
            datetime.date(1985, 12, 25)
            >>> timewrapper.parse_date(datetime(1985, 12, 25, 8, 30))
            datetime.date(1985, 12, 25)
        """
        if isinstance(value, date) and not isinstance(value, datetime):
            return value
        elif isinstance(value, str):
            return self.str2date(value)
        elif isinstance(value, int):
            return date.fromordinal(value)
        elif isinstance(value, datetime):
            return value.date()
        else:
            raise Exception("Unable to parse date from: %s, type<%s>." % (
                            value, type(value)))