code: public void setFormatForDatesBeforeCommonEra(DateTimeFormatter formatForDatesBeforeCommonEra) {
          this.formatForDatesBeforeCommonEraStrict
              = formatForDatesBeforeCommonEra.withResolverStyle(ResolverStyle.STRICT);
          if (parentDatePicker != null) {
              parentDatePicker.setTextFieldToValidStateIfNeeded();
          }
      }
docs: setFormatForDatesBeforeCommonEra, This sets the format that is used to display or parse BCE
  dates in the date picker, from a DateTimeFormatter instance. The default value for the date
  format is generated using the locale of the settings instance.
  
  For most desired date formats, it would probably be easier to use the other "pattern string"
  version of this function. (which accepts a date pattern string instead of a DateTimeFormatter
  instance.)
  
  Note: It is important to use the letter "u" (astronomical year) instead of "y" (year of era)
  when creating pattern strings for BCE dates. This is because the DatePicker uses ISO 8601,
  which specifies "Astronomical year numbering". (Additional details: The astronomical year
  "-1" and "1 BC" are not the same thing. Astronomical years are zero-based, and BC dates are
  one-based. Astronomical year "0", is the same year as "1 BC", and astronomical year "-1" is
  the same year as "2 BC", and so forth.)
  
  The various codes for the date pattern string are described at this link:
  https://docs.oracle.com/javase/8/docs/api/java/time/format/DateTimeFormatter.html
  
  If the date picker has already been constructed, then calling this function will cause
  immediate validation of the text field text.