List of utility methods to do Today
String | getToday(String datePattern) get Today Format formatter = new SimpleDateFormat(datePattern); return formatter.format(Today()); |
String | getToday(String format) get Today String result = ""; try { Date today = new Date(); SimpleDateFormat simpleFormat = new SimpleDateFormat(format); result = simpleFormat.format(today); } catch (Exception e) { return result; ... |
String | getToday(String formatString) get Today Date today = new Date(); Locale currentLocale = new Locale("KOREAN", "KOREA"); String pattern = formatString; SimpleDateFormat formatter = new SimpleDateFormat(pattern, currentLocale); return formatter.format(today); |
Date | getToday(String time) get Today String today = todayStr(); return getDateTime(today + " " + time, DEFAULT_FORMAT_DATETIME); |
long | getTodayAsLong() Liefert das heutige Datum als long long ret = 0; GregorianCalendar calToday = new GregorianCalendar(TimeZone.getTimeZone("Europe/Berlin")); calToday.setFirstDayOfWeek(Calendar.SUNDAY); try { ret = getDateAsLong(calToday.getTime()); } catch (NumberFormatException e) { return ret; ... |
String | getTodayAsSecond() get Today As Second return getTodayAsSecond(0);
|
Date | getTodayDate() get Today Date return parseDateFromDateStr(formatDate2DateStr(new Date())); |
Date | getTodayDate() get Today Date DateFormat dateFormat = new SimpleDateFormat(ENCOUNTER_DATE_PATTERN); Date date = new Date(); String dateString = dateFormat.format(date); return getDateFromString(dateString); |
Date | getTodayDate() get Today Date Calendar cal = Calendar.getInstance();
Calendar now = Calendar.getInstance();
now.clear();
now.set(cal.get(Calendar.YEAR), cal.get(Calendar.MONTH), cal.get(Calendar.DATE));
return now.getTime();
|
String | getTodayDateAsString() get the current date as string using the mysql date format yyyy-MM-dd Calendar calendar = Calendar.getInstance(); Date today = calendar.getTime(); SimpleDateFormat simpleDateFormat = new SimpleDateFormat(mysqlDateFormat); return simpleDateFormat.format(today); |