Android Date Format getCurrentDay()

Here you can find the source of getCurrentDay()

Description

get Current Day

Declaration

public static String getCurrentDay() 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    public static String getCurrentDay() {
        return getFormatCurrentTime("dd");
    }/*from w  ww .ja v a 2 s  . c o m*/

    public static String getFormatCurrentTime(String format) {
        return getFormatDateTime(new Date(), format);
    }

    public static String getFormatDateTime(Date date, String format) {
        SimpleDateFormat sdf = new SimpleDateFormat(format);
        return sdf.format(date);
    }
}

Related

  1. fromString(String dateStr, String dateFormat, Locale locale)
  2. getBeforeYear()
  3. getCurrentDate()
  4. getCurrentDateString(String dateFormat)
  5. getCurrentDateTime()
  6. getCurrentDayOfWeek()
  7. getCurrentFormatedDate()
  8. getCurrentMonth()
  9. getCurrentTime()