# Path: src/pycrunchbase/resource/utils.py
# def parse_date(datelike):
#     """Helper for parsing dates in Organization properties"""
#     try:
#         return datetime.strptime(datelike, "%Y-%m-%d")
#     except ValueError:
#         return datelike


import six
from .node import Node
from .utils import parse_date
        "role_company",
        "role_investor",
        "role_group",
        "role_school",
        "founded_on",
        "founded_on_trust_code",
        "is_closed",
        "closed_on",
        "closed_on_trust_code",
        "num_employees_min",
        "num_employees_max",
        "total_funding_usd",
        "number_of_investments",
        "homepage_url",
        "created_at",
        "updated_at",
        "stock_exchange",
        "stock_symbol",
        "contact_email",
        "phone_number",
        "rank"
    ]

    def _coerce_values(self):
        """A delegate method to handle parsing all data and converting
        them into python values
        """
        # special cases to convert strings to pythonic value
        for attr in ['closed_on', 'founded_on']:
            if getattr(self, attr, None):

# Path: src/pycrunchbase/resource/utils.py
# def parse_date(datelike):
#     """Helper for parsing dates in Organization properties"""
#     try:
#         return datetime.strptime(datelike, "%Y-%m-%d")
#     except ValueError:
#         return datelike


# Path: src/pycrunchbase/resource/organization.py
import six
from .node import Node
from .utils import parse_date

        "role_company",
        "role_investor",
        "role_group",
        "role_school",
        "founded_on",
        "founded_on_trust_code",
        "is_closed",
        "closed_on",
        "closed_on_trust_code",
        "num_employees_min",
        "num_employees_max",
        "total_funding_usd",
        "number_of_investments",
        "homepage_url",
        "created_at",
        "updated_at",
        "stock_exchange",
        "stock_symbol",
        "contact_email",
        "phone_number",
        "rank"
    ]

    def _coerce_values(self):
        """A delegate method to handle parsing all data and converting
        them into python values
        """
        # special cases to convert strings to pythonic value
        for attr in ['closed_on', 'founded_on']:
            if getattr(self, attr, None):

                setattr(self, attr, parse_date(getattr(self, attr)))