Ejemplo n.º 1
0
  /*[deutsch]
   * <p>Liefert den sprachabh&auml;ngigen Beschreibungstext. </p>
   *
   * @param   locale      language setting
   * @param   width       text width
   * @return  descriptive text for given locale and width (never {@code null})
   * @since   3.0
   */
  public String getDisplayName(Locale locale, TextWidth width) {

    CalendarText names = CalendarText.getInstance(ISO_CALENDAR_TYPE, locale);
    return names.getEras(width).print(this);
  }
Ejemplo n.º 2
0
  /*[deutsch]
   * <p>Liefert einen alternativen sprachabh&auml;ngigen Beschreibungstext. </p>
   *
   * <p>Aktuell liefert diese Methode nur die englischen Bezeichnungen
   * &quot;Common Era&quot; bzw. &quot;CE&quot; f&uuml;r {@code AD}. </p>
   *
   * @param   locale      language setting
   * @param   width       text width
   * @return  alternative descriptive text for given locale and width (never {@code null})
   * @since   3.0
   */
  public String getAlternativeName(Locale locale, TextWidth width) {

    CalendarText names = CalendarText.getInstance(ISO_CALENDAR_TYPE, locale);
    ChronoElement<HistoricEra> element = ChronoHistory.ofFirstGregorianReform().era();
    return names.getTextForms(element, ((width == TextWidth.WIDE) ? "w" : "a"), "alt").print(this);
  }