private static String getMacFormat(CF cf, Pointer localeRef, long dateStyle, long timeStyle) {
    var formatter = cf.CFDateFormatterCreate(null, localeRef, dateStyle, timeStyle);
    if (formatter == null) throw new IllegalStateException("CFDateFormatterCreate: null");
    try {
      var format = cf.CFDateFormatterGetFormat(formatter);
      return getMacString(cf, format);
    }
    finally {
      cf.CFRelease(formatter);
    }
  }
private static String getMacFormat(CF cf, Pointer localeRef, long dateStyle, long timeStyle)