code: public HistoricDate getBeginOfYear(
          HistoricEra era,
          int yearOfEra
      ) {
  
          HistoricDate newYear = this.getNewYearStrategy().newYear(era, yearOfEra);
  
          if (this.isValid(newYear)) {
              PlainDate date = this.convert(newYear);
              HistoricEra preferredEra = this.eraPreference.getPreferredEra(newYear, date);
              if (preferredEra != era) {
                  int yoe = preferredEra.yearOfEra(newYear.getEra(), newYear.getYearOfEra());
                  newYear = HistoricDate.of(preferredEra, yoe, newYear.getMonth(), newYear.getDayOfMonth());
              }
              return newYear;
          } else {
              throw new IllegalArgumentException("Cannot determine valid New Year: " + era + "-" + yearOfEra);
          }
  
      }
docs: /*[deutsch]
  <p>Determines the date of New Year. </p>
  
  <p>Hinweis: Diese Methode sollte normalerweise ein g&uuml;ltiges historisches Datum liefern,
  es sei denn, die Neujahrsstrategie wurde so konfiguriert, da&szlig; sie nicht mit den
  gew&auml;hlten Kalenderumstellungsdaten harmoniert. </p>
  
  @param   era             historic era
  @param   yearOfEra       historic year of era as displayed (deviating from standard calendar year)
  @return  historic date of New Year
  @throws  IllegalArgumentException if given year is out of range or such that the result becomes invalid
  @see     NewYearRule
  @see     #getLengthOfYear(HistoricEra, int)
  @see     #with(NewYearStrategy)
  @see     #isValid(HistoricDate)
  @see     HistoricDate#getYearOfEra(NewYearStrategy)
  @since   3.14/4.11