def parse_cldr_json(directory, language_codes=DEFAULT_LANGUAGE_CODES,
                    massage=True):
    '''Parse CLDR JSON datasets to for date time things.'''

    am_strings = set()
    pm_strings = set()
    month_to_int = {}

    for lang in language_codes:
        path = os.path.join(directory, 'main', lang, 'ca-gregorian.json')

        with open(path) as in_file:
            doc = json.load(in_file)

        months_dict = doc['main'][lang]['dates']['calendars']['gregorian']['months']['format']['abbreviated']
        day_periods_dict = doc['main'][lang]['dates']['calendars']['gregorian']['dayPeriods']['format']['abbreviated']

        for month, month_str in months_dict.items():
            if massage:
                month_str = unicodedata.normalize('NFKD', month_str).lower().strip('.')

            month_to_int[month_str] = int(month)

        am_str = day_periods_dict['am']
        pm_str = day_periods_dict['pm']

        if massage:
            am_str = unicodedata.normalize('NFKD', am_str).lower().strip('.')
            pm_str = unicodedata.normalize('NFKD', pm_str).lower().strip('.')

        am_strings.add(am_str)
        pm_strings.add(pm_str)

    print(pprint.pformat(am_strings))
    print(pprint.pformat(pm_strings))
    print(pprint.pformat(month_to_int))
Parse CLDR JSON datasets to for date time things.