# Path: nba_data/data/date_range.py
# class DateRange:
#     def __init__(self, start=date.today(), end=date.today()):
#         assert start <= end
# 
#         self.start = start
#         self.end = end
# 
#     def is_date_in_range(self, value):
#         assert isinstance(value, date)
# 
#         return self.start <= value <= self.end


from datetime import datetime
from nba_data.data.date_range import DateRange



class CalendarDeserializer:
    internal_field_name = "_internal"
    start_date_field_name = "startDate"
    end_date_field_name = "endDate"
    start_date_current_season_field_name = "startDateCurrentSeason"
    fields_to_ignore = { internal_field_name, start_date_field_name, end_date_field_name, start_date_current_season_field_name }
    date_format = "%Y%m%d"

    def __init__(self):
        pass

    # TODO: @jbradley add pub date time to returned object
    @staticmethod

# Path: nba_data/data/date_range.py
# class DateRange:
#     def __init__(self, start=date.today(), end=date.today()):
#         assert start <= end
# 
#         self.start = start
#         self.end = end
# 
#     def is_date_in_range(self, value):
#         assert isinstance(value, date)
# 
#         return self.start <= value <= self.end


# Path: nba_data/deserializers/calendar.py
from datetime import datetime
from nba_data.data.date_range import DateRange




class CalendarDeserializer:
    internal_field_name = "_internal"
    start_date_field_name = "startDate"
    end_date_field_name = "endDate"
    start_date_current_season_field_name = "startDateCurrentSeason"
    fields_to_ignore = { internal_field_name, start_date_field_name, end_date_field_name, start_date_current_season_field_name }
    date_format = "%Y%m%d"

    def __init__(self):
        pass

    # TODO: @jbradley add pub date time to returned object
    @staticmethod

    def deserialize(calendar_json, date_range=DateRange(), ignore_dates_without_games=True):