Code example for SimpleDateFormat

Methods: format, setTimeZone

0
		return formatDateBase(date, format, timeZone);
	} 
 
	private static String formatDateBase(long date, String format,
			String timeZone) {
		DateFormat simpleFormat = new SimpleDateFormat(format);
		if (timeZone != null) {
			simpleFormat.setTimeZone(TimeZone.getTimeZone(timeZone));
		} else { 
			simpleFormat.setTimeZone(TimeZone.getDefault());
		} 
		return simpleFormat.format(date);
	} 
 
	/** 
	 * Gets the desired day as a Date 
	 *  
	 * @param day 
	 *            Can be: <li>QuickUtils.date.YESTERDAY</li><li> 
	 *            QuickUtils.date.TODAY</li><li>QuickUtils.date.TOMORROW</li> 
	 * @return returns a Date for that day