code: public static String format(Object obj, String mask, double round) {
  
          if (obj == null) {
              return "";
          }
  
          if (obj instanceof Date) {
              return formatDate((Date) obj, mask);
          }
  
          if (obj instanceof Number) {
              return formatNumber((Number) obj, mask, round);
          }
  
          return obj.toString();
      }
docs: /* GLOBAL FORMAT FUNCTION