Extracts the wide or abbreviated month names for a specified locale.
If cldr is not installed values default to that for locale en_US.

@param {Boolean} abbr
@param {String} locale
@api private
774751
function _extractLocaleMonths(abbr, locale) {
      var months = []
      if(abbr) {
        months = cldr ? cldr.extractMonthNames(locale).format.abbreviated : ['Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec'];
      }
      else {
        months = cldr ? cldr.extractMonthNames(locale).format.wide : ['January', 'February', 'March', 'April', 'May', 'June', 'July', 'August', 'September', 'October', 'November', 'December'];
      }

      months.unshift('');
      return months;
    }
804715
function getText(locale, ...args) {
    const key = args[0];
    if (!key) return null;

    // try locale
    let resource = ebLocales[locale] || {};
    let text = resource[key];
    if (text === undefined && locale !== 'en-us') {
      // try en-us
      resource = ebLocales['en-us'] || {};
      text = resource[key];
    }
    // equal key
    if (text === undefined) {
      text = key;
    }
    // format
    args[0] = text;
    return localeutil.getText.apply(localeutil, args);
  }
497381
function getLocaleMonthNames(locale, formStyle, width) {
    var /** @type {?} */ data = findLocaleData(locale);
    var /** @type {?} */ monthsData = /** @type {?} */ ([data[5 /* MonthsFormat */], data[6 /* MonthsStandalone */]]);
    var /** @type {?} */ months = getLastDefinedValue(monthsData, formStyle);
    return getLastDefinedValue(months, width);
}
1045031
public static String getLocalDisplayName(String locale) {
		String desc = "" + locale;
		if (locale != null) {
			String[] langArray = locale.split("_");
	        Locale loc = null;
	        if (langArray.length == 1) {
	            loc = new Locale(langArray[0]);
	        } else if (langArray.length == 2) {
	            loc = new Locale(langArray[0], langArray[1]);
	        } else if (langArray.length == 3) {
	            loc = new Locale(langArray[0], langArray[1], langArray[2]);
	        }
	        if (loc != null) {
	        	desc = loc.getDisplayLanguage(loc);
	        }
		}
		return desc;
	}
104009
private static int tryParseMonth(String month, Locale locale) {
		Map<String, Integer> names = getMonthNames(locale);
		Integer r = names.get(month.toUpperCase());
		if (r != null) {
			return r;
		}
		return -1;
	}
310487
private String determineLanguage(FacesContext fc, DataTable dataTable) {
		final List<String> availableLanguages = Arrays.asList("de", "en", "es", "fr", "hu", "it", "nl", "pl", "pt",
				"ru");
		if (BsfUtils.isStringValued(dataTable.getCustomLangUrl())) {
			return dataTable.getCustomLangUrl();
		} else if (BsfUtils.isStringValued(dataTable.getLang())) {
			String lang = dataTable.getLang();
			if (availableLanguages.contains(lang)) {
				return determineLanguageUrl(fc, lang);
			}
		} else {
			String lang = fc.getViewRoot().getLocale().getLanguage();
			if (availableLanguages.contains(lang)) {
				return determineLanguageUrl(fc, lang);
			}
		}
		return null;
	}
236558
function(abbr) {
			abbr = abbr || '';
			
			var that = this;
			
			// find multiplier
			abbr = abbr.replace(/\*(\d+)?$/, function(str, repeatCount) {
				that._setRepeat(repeatCount);
				return '';
			});
			
			this.abbreviation = abbr;
			
			var abbrText = extractText(abbr);
			if (abbrText) {
				abbr = abbrText.element;
				this.content = this._text = abbrText.text;
			}
			
			var abbrAttrs = parseAttributes(abbr);
			if (abbrAttrs) {
				abbr = abbrAttrs.element;
				this._attributes = abbrAttrs.attributes;
			}
			
			this._name = abbr;
			
			// validate name
			if (this._name && !reValidName.test(this._name)) {
				throw new Error('Invalid abbreviation');
			}
		}
103724
function(abbr) {
			// search for value start
			var abbrValues = this.findValuesInAbbreviation(abbr);
			if (!abbrValues) {
				return {
					property: abbr,
					values: null
				};
			}
			
			return {
				property: abbr.substring(0, abbr.length - abbrValues.length).replace(/-$/, ''),
				values: this.parseValues(abbrValues)
			};
		}
725155
function getLocaleDayPeriods(locale, formStyle, width) {
    var /** @type {?} */ data = findLocaleData(locale);
    var /** @type {?} */ amPmData = /** @type {?} */ ([data[1 /* DayPeriodsFormat */], data[2 /* DayPeriodsStandalone */]]);
    var /** @type {?} */ amPm = getLastDefinedValue(amPmData, formStyle);
    return getLastDefinedValue(amPm, width);
}
110292
private NameAndLocale getNameAndLocale(CmsResource bundleRes) {

        String fileName = bundleRes.getName();
        if (TYPE_PROPERTIES_BUNDLE.equals(OpenCms.getResourceManager().getResourceType(bundleRes).getTypeName())) {
            String localeSuffix = CmsStringUtil.getLocaleSuffixForName(fileName);
            if (localeSuffix == null) {
                return new NameAndLocale(fileName, null);
            } else {
                String base = fileName.substring(
                    0,
                    fileName.lastIndexOf(localeSuffix) - (1 /* cut off trailing underscore, too*/));
                Locale locale = CmsLocaleManager.getLocale(localeSuffix);
                return new NameAndLocale(base, locale);
            }
        } else {
            return new NameAndLocale(fileName, null);
        }
    }
342214
def _is_allowed_abbr(self, tokens):
        """"""
        if len(tokens) <= 2:
            abbr_text = ''.join(tokens)
            if self.abbr_min <= len(abbr_text) <= self.abbr_max and bracket_level(abbr_text) == 0:
                if abbr_text[0].isalnum() and any(c.isalpha() for c in abbr_text):
                    # Disallow property values
                    if re.match('^\d+(\.\d+)?(g|m[lL]|cm)$', abbr_text):
                        return False
                    return True
        return False
65061
function dateStrGetter(name, width, form, extended) {
    if (form === void 0) { form = FormStyle.Format; }
    if (extended === void 0) { extended = false; }
    return function (date, locale) {
        return getDateTranslation(date, locale, name, width, form, extended);
    };
}
1307639
function DateLocaleProvider() {
      /** Array of full month names. E.g., ['January', 'February', ...] */
      this.months = null;

      /** Array of abbreviated month names. E.g., ['Jan', 'Feb', ...] */
      this.shortMonths = null;

      /** Array of full day of the week names. E.g., ['Monday', 'Tuesday', ...] */
      this.days = null;

      /** Array of abbreviated dat of the week names. E.g., ['M', 'T', ...] */
      this.shortDays = null;

      /** Array of dates of a month (1 - 31). Characters might be different in some locales. */
      this.dates = null;

      /** Index of the first day of the week. 0 = Sunday, 1 = Monday, etc. */
      this.firstDayOfWeek = 0;

      /**
       * Function that converts the date portion of a Date to a string.
       * @type {(function(Date): string)}
       */
      this.formatDate = null;

      /**
       * Function that converts a date string to a Date object (the date portion)
       * @type {function(string): Date}
       */
      this.parseDate = null;

      /**
       * Function that formats a Date into a month header string.
       * @type {function(Date): string}
       */
      this.monthHeaderFormatter = null;

      /**
       * Function that formats a week number into a label for the week.
       * @type {function(number): string}
       */
      this.weekNumberFormatter = null;

      /**
       * Function that formats a date into a long aria-label that is read
       * when the focused date changes.
       * @type {function(Date): string}
       */
      this.longDateFormatter = null;

      /**
       * Function to determine whether a string makes sense to be
       * parsed to a Date object.
       * @type {function(string): boolean}
       */
      this.isDateComplete = null;

      /**
       * ARIA label for the calendar "dialog" used in the datepicker.
       * @type {string}
       */
      this.msgCalendar = '';

      /**
       * ARIA label for the datepicker's "Open calendar" buttons.
       * @type {string}
       */
      this.msgOpenCalendar = '';
    }
984823
public static function getMonthAsString($p_month, $p_lang, $p_html = true)
    {
        $month = '';
        switch ($p_lang) {
            case \FreeFW\Constants::LANG_FR:
                switch ($p_month) {
                    case 1:
                        $month = 'Janvier';
                        break;
                    case 2:
                        $month = 'Février';
                        break;
                    case 3:
                        $month = 'Mars';
                        break;
                    case 4:
                        $month = 'Avril';
                        break;
                    case 5:
                        $month = 'Mai';
                        break;
                    case 6:
                        $month = 'Juin';
                        break;
                    case 7:
                        $month = 'Juillet';
                        break;
                    case 8:
                        $month = 'Août';
                        break;
                    case 9:
                        $month = 'Septembre';
                        break;
                    case 10:
                        $month = 'Octobre';
                        break;
                    case 11:
                        $month = 'Novembre';
                        break;
                    case 12:
                        $month = 'Décembre';
                        break;
                }
                break;
            default:
                break;
        }
        if ($p_html) {
            return htmlentities($month);
        }
        return $month;
    }
594853
private String _getDisplayName(int style, boolean daylight, ULocale locale) {
        if (locale == null) {
            throw new NullPointerException("locale is null");
        }

        String result = null;

        if (style == GENERIC_LOCATION || style == LONG_GENERIC || style == SHORT_GENERIC) {
            // Generic format
            TimeZoneFormat tzfmt = TimeZoneFormat.getInstance(locale);
            long date = System.currentTimeMillis();
            Output<TimeType> timeType = new Output<TimeType>(TimeType.UNKNOWN);

            switch (style) {
            case GENERIC_LOCATION:
                result = tzfmt.format(Style.GENERIC_LOCATION, this, date, timeType);
                break;
            case LONG_GENERIC:
                result = tzfmt.format(Style.GENERIC_LONG, this, date, timeType);
                break;
            case SHORT_GENERIC:
                result = tzfmt.format(Style.GENERIC_SHORT, this, date, timeType);
                break;
            }

            // Generic format many use Localized GMT as the final fallback.
            // When Localized GMT format is used, the result might not be
            // appropriate for the requested daylight value.
            if (daylight && timeType.value == TimeType.STANDARD ||
                    !daylight && timeType.value == TimeType.DAYLIGHT) {
                int offset = daylight ? getRawOffset() + getDSTSavings() : getRawOffset();
                result = (style == SHORT_GENERIC) ?
                        tzfmt.formatOffsetShortLocalizedGMT(offset) : tzfmt.formatOffsetLocalizedGMT(offset);
            }

        } else if (style == LONG_GMT || style == SHORT_GMT) {
            // Offset format
            TimeZoneFormat tzfmt = TimeZoneFormat.getInstance(locale);
            int offset = daylight && useDaylightTime() ? getRawOffset() + getDSTSavings() : getRawOffset();
            switch (style) {
            case LONG_GMT:
                result = tzfmt.formatOffsetLocalizedGMT(offset);
                break;
            case SHORT_GMT:
                result = tzfmt.formatOffsetISO8601Basic(offset, false, false, false);
                break;
            }
        } else {
            // Specific format
            assert(style == LONG || style == SHORT || style == SHORT_COMMONLY_USED);

            // Gets the name directly from TimeZoneNames
            long date = System.currentTimeMillis();
            TimeZoneNames tznames = TimeZoneNames.getInstance(locale);
            NameType nameType = null;
            switch (style) {
            case LONG:
                nameType = daylight ? NameType.LONG_DAYLIGHT : NameType.LONG_STANDARD;
                break;
            case SHORT:
            case SHORT_COMMONLY_USED:
                nameType = daylight ? NameType.SHORT_DAYLIGHT : NameType.SHORT_STANDARD;
                break;
            }
            result = tznames.getDisplayName(ZoneMeta.getCanonicalCLDRID(this), nameType, date);
            if (result == null) {
                // Fallback to localized GMT
                TimeZoneFormat tzfmt = TimeZoneFormat.getInstance(locale);
                int offset = daylight && useDaylightTime() ? getRawOffset() + getDSTSavings() : getRawOffset();
                result = (style == LONG) ?
                        tzfmt.formatOffsetLocalizedGMT(offset) : tzfmt.formatOffsetShortLocalizedGMT(offset);
            }
        }
        assert(result != null);

        return result;
    }
868770
function extractMDNProperties(mdnEntry) {
  if (mdnEntry.status === 'standard') {
    return {
      syntax: mdnEntry.syntax
    }
  }

  return {
    status: abbreviateStatus(mdnEntry.status),
    syntax: mdnEntry.syntax
  }
}
636699
def translate_month_abbr(
        date_str,
        source_lang=DEFAULT_DATE_LANG,
        target_lang=DEFAULT_DATE_LANG):
    """"""
    month_num, month_abbr = get_month_from_date_str(date_str, source_lang)
    with calendar.different_locale(LOCALES[target_lang]):
        translated_abbr = calendar.month_abbr[month_num]
        return re.sub(
            month_abbr, translated_abbr, date_str, flags=re.IGNORECASE)