Java Utililty Methods Today

List of utility methods to do Today

Description

The list of methods to do Today are organized into topic(s).

Method

StringtodaysTime()
Get today's time in format DD-MMM-YYYY-HH:MM:SS
Date date = new Date();
SimpleDateFormat formatterOut = null;
formatterOut = new SimpleDateFormat("dd-MMM-yyyy-HH:mm:ss");
return formatterOut.format(date);
StringtodayStr()
today Str
return currentDateStr();
StringtodayString(final String sFormat)
Returns the current date as a String formated with the given format
java.util.Date date = new java.util.Date(Calendar.getInstance().getTimeInMillis());
SimpleDateFormat dateFormat = new SimpleDateFormat(sFormat);
return dateFormat.format(date);
inttranslateToDayNumber(int y, int m, int d)
translate To Day Number
Calendar cal = new GregorianCalendar(y, m - 1, d);
return translateToDayNumber(cal);