Android Utililty Methods Today Get

List of utility methods to do Today Get

Description

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

Method

DategetToday()
get Today
Date now = new Date();
Date today = new Date(now.getYear(), now.getMonth(), now.getDate()); 
return today;
StringgetToday00Time()
get Today Time
Date curDate = new Date(System.currentTimeMillis());
SimpleDateFormat sdf = new SimpleDateFormat("yyyyMMdd000000");
String result = sdf.format(curDate);
return result;
StringgetCurDateTimeinString()
get Cur Date Timein String
DateFormat df = new SimpleDateFormat("MM/dd/yyyy HH:mm:ss");
Date today = Calendar.getInstance().getTime();
String reportDate = df.format(today);
return reportDate;
Datetoday()
today
return new Date(now());
booleanisToday(String sdate)
is Today
boolean b = false;
Date time = toDate(sdate);
Date today = new Date();
if (time != null) {
    String nowDate = dateFormater2.get().format(today);
    String timeDate = dateFormater2.get().format(time);
    if (nowDate.equals(timeDate)) {
        b = true;
...
StringgetTodaysDate()
get Todays Date
DateFormat dateFormat = new SimpleDateFormat("MM/dd/yyyy",
        Locale.US);
Date date = new Date();
String today = dateFormat.format(date);
return today;
booleanisToday(long dateUtc)
is Today
final long currentTime = System.currentTimeMillis();
final Calendar calendarBefore = Calendar.getInstance();
calendarBefore.setTimeInMillis(currentTime);
calendarBefore.set(Calendar.HOUR_OF_DAY, 0);
calendarBefore.set(Calendar.MINUTE, 0);
calendarBefore.set(Calendar.SECOND, 0);
calendarBefore.set(Calendar.MILLISECOND, 0);
final Calendar calendarAfter = Calendar.getInstance();
...