* @stable ICU 4.0
*/
public static String[] getAvailableCurrencyCodes(ULocale loc, Date d) {
CurrencyMetaInfo info = CurrencyMetaInfo.getInstance();
CurrencyFilter filter = CurrencyFilter.onDate(d).withRegion(loc.getCountry());
List<String> list = info.currencies(filter);
// Note: Prior to 4.4 the spec didn't say that we return null if there are no results, but
// the test assumed it did. Kept the behavior and amended the spec.
if (list.isEmpty()) {
return null;
}