Retrieve a date format from the pool of free resources.
@param format The date format to apply to the resource returned
@return The next available date format from the pool of free resources
973927
public SimpleDateFormat getFormat(String format)
    {
        SimpleDateFormat f = (SimpleDateFormat)get();
        f.applyPattern(format);
        return f;
    }
671647
public static Marshaller getMarshaller(MarshallingFormat format, ClassLoader classLoader) {
        return getMarshaller(null, format, classLoader);
    }
867536
public boolean select(String date, String format, Locale locale) {
        SimpleDateFormat inDateFormat = new SimpleDateFormat(format, locale);
        SimpleDateFormat outDateForm = new SimpleDateFormat("dd/MMM/yyyy", locale);
        try {
            Date fromDate = inDateFormat.parse(date);
            date = outDateForm.format(fromDate);
        } catch (ParseException e) {
            LOGGER.error("ParseException: {}", e);
        }
        String[] dates = date.split("/");
        return setDate(Integer.parseInt(dates[0]) + "", dates[1], dates[2]);
    }
127128
public static String dateToString(final Date date, final String format) {
        if (date == null) {
            return null;
        }
        final DateFormat dateFormat = new SimpleDateFormat(format, Locale.US);
        return dateFormat.format(date);
    }
1127032
public static String getNextDay2String(String nowdate, String delay, Format format) {
        try {
            SimpleDateFormat localFormat = (SimpleDateFormat) format;
            String mdate = "";
            Date date = strToDateWithFormat(nowdate, localFormat);
            long myTime = (date.getTime() / 1000) + Integer.parseInt(delay) * 24 * 60 * 60;
            date.setTime(myTime * 1000);
            mdate = localFormat.format(date);
            return mdate;
        } catch (Exception e) {
            return "";
        }
    }
1088206
public static DateFormat getUSDateTimeFormat(int dateStyle, int timeStyle) {
    String pattern = getDatePartOfDateTimePattern(dateStyle) + " " + getTimePartOfDateTimePattern(timeStyle);
    return new SimpleDateFormat(pattern, Locale.US);
  }
846253
@MapMethod
    public String formatDate(Date d, String format){
        return Objects.formatDate(d, format);
    }
983236
private String getFormattedDate(int dateTimeFormat) {

        DateFormat df;
        String result;
        if (isWholeDay()) {
            df = DateFormat.getDateInstance(dateTimeFormat, m_series.getLocale());
            result = df.format(getStart());
            if (getLastDay().after(getStart())) {
                result += DATE_SEPARATOR + df.format(getLastDay());
            }
        } else {
            df = DateFormat.getDateTimeInstance(dateTimeFormat, DateFormat.SHORT, m_series.getLocale());
            result = df.format(getStart());
            if (getEnd().after(getStart())) {
                if (isMultiDay()) {
                    result += DATE_SEPARATOR + df.format(getEnd());
                } else {
                    df = DateFormat.getTimeInstance(DateFormat.SHORT, m_series.getLocale());
                    result += DATE_SEPARATOR + df.format(getEnd());
                }
            }
        }

        return result;
    }
123976
public Date asDate(String format) throws ParsableException {
        SimpleDateFormat dateformat = new SimpleDateFormat(format);
        return asDate(dateformat);
    }
545824
public static Format getDateFormatter(final String pattern) {
		Format format = JKFormatUtil.formatMap.get(pattern);
		if (format == null) {
			format = new SimpleDateFormat(pattern);
			JKFormatUtil.formatMap.put(pattern, format);
		}
		return format;
	}
821724
public static FastDateFormat getDateInstance(final int style, final Locale locale) {
		return cache.getDateInstance(style, null, locale);
	}
776260
public static String getSLcDtTm( String FormatS ) {
		//
		String Result = "?";
		//
    	LocalDateTime LDT = LocalDateTime.now();
    	//
    	Result = "LDTm: " +  LDT.format( DateTimeFormatter.ofPattern( FormatS ) );
    	//
		return Result;
	}
411855
public static String convert(String date, String format, String newFormat) {
        return getFormatDate(newFormat, parse(date, format));
    }
627029
public static String format(final long time, final String format) {
		return format(time, DateTimeFormat.forPattern(format));
	}
504705
public String getFormattedDate(DateFormat formatter){
        mCalendar.set(Calendar.YEAR, mAdapter.getYear());
        mCalendar.set(Calendar.MONTH, mAdapter.getMonth());
        mCalendar.set(Calendar.DAY_OF_MONTH, mAdapter.getDay());
        return formatter.format(mCalendar.getTime());
    }
1308369
public final String formatFinish(Format format) {
        if (format != null) {
            Long minFinish = interval.getMinFinish();
            if (minFinish != null) {
                return format.format(minFinish);
            } else {
                return null;
            }
        } else {
            Long minFinish = interval.getMinFinish();
            if (minFinish != null) {
                return numberFormat.get().format(minFinish);
            } else {
                return null;
            }
        }
    }
1225262
static public long getDateTime(String s, String format, TimeZone tz)
    {
        long ret = 0L;
        SimpleDateFormat df = null;

        try
        {
            if(s != null && s.length() > 0)
            {
                df = formatPool.getFormat(format);
                df.setTimeZone(tz);
                Date dt = df.parse(s);
                ret = dt.getTime();
            }
        }
        catch(Exception e)
        {
        }

        if(df != null)
            formatPool.release(df);

        return ret;
    }