code: public static boolean isAvailable(String code, Date from, Date to) {
          if (!isAlpha3Code(code)) {
              return false;
          }
  
          if (from != null && to != null && from.after(to)) {
              throw new IllegalArgumentException("To is before from");
          }
  
          code = code.toUpperCase(Locale.ENGLISH);
          boolean isKnown = getAllCurrenciesAsSet().contains(code);
          if (isKnown == false) {
              return false;
          } else if (from == null && to == null) {
              return true;
          }
  
          // If caller passed a date range, we cannot rely solely on the cache
          CurrencyMetaInfo info = CurrencyMetaInfo.getInstance();
          List<String> allActive = info.currencies(
                  CurrencyFilter.onDateRange(from, to).withCurrency(code));
          return allActive.contains(code);
      }
docs: Queries if the given ISO 4217 3-letter code is available on the specified date range.
  <p>
  Note: For checking availability of a currency on a specific date, specify the date on both <code>from</code> and
  <code>to</code>. When both <code>from</code> and <code>to</code> are null, this method checks if the specified
  currency is available all time.
  
  @param code
  The ISO 4217 3-letter code.
  @param from
  The lower bound of the date range, inclusive. When <code>from</code> is null, check the availability
  of the currency any date before <code>to</code>
  @param to
  The upper bound of the date range, inclusive. When <code>to</code> is null, check the availability of
  the currency any date after <code>from</code>
  @return true if the given ISO 4217 3-letter code is supported on the specified date range.
  @throws IllegalArgumentException when <code>to</code> is before <code>from</code>.