List of utility methods to do Today
String | getTodayDateInString() returns today's date in DDMMYY format in string String todaydate = new SimpleDateFormat("ddMMyy").format(new Date()); return todaydate; |
String | getTodayDbFormat() get Today Db Format return dbSdf.format(getToday());
|
String | getTodayDisplayString() get Today Display String Calendar c = Calendar.getInstance(); StringBuffer sb = new StringBuffer(); sb.append(c.getDisplayName(Calendar.DAY_OF_WEEK, Calendar.LONG, Locale.getDefault())); sb.append(", "); sb.append(get4CharDate(c.getTime())); return sb.toString(); |
Calendar | getTodayEnd() get Today End Calendar todayEnd = Calendar.getInstance();
todayEnd.set(Calendar.HOUR_OF_DAY, 23);
todayEnd.set(Calendar.MINUTE, 59);
todayEnd.set(Calendar.SECOND, 59);
return todayEnd;
|
String | getTodayEnd() get Today End Calendar calendar = Calendar.getInstance(); calendar.set(Calendar.HOUR_OF_DAY, 23); calendar.set(Calendar.MINUTE, 59); calendar.set(Calendar.SECOND, 59); Date date = new Date(calendar.getTimeInMillis()); return longDateFormat.format(date); |
String | getToDayEndTime() get To Day End Time return getCurrentDay("yyyy-MM-dd") + " 23:59:59"; |
String | getTodayFolder() get Today Folder return dateFormat.format(new Date()); |
String | getTodayFormat(String format) get Today Format Date today = new Date(); SimpleDateFormat formater; formater = new SimpleDateFormat(format); Calendar cal = Calendar.getInstance(); cal.setTime(today); return formater.format(cal.getTime()); |
String | getTodayFormatString(String pattern) get Today Format String SimpleDateFormat formatter = new SimpleDateFormat(pattern, Locale.UK); return formatter.format(new Date()); |
String | getTodayFormatted(String pattern) Returns the date formatted in given pattern SimpleDateFormat sdf = new SimpleDateFormat(pattern); return sdf.format(new Date()); |