Android Date Today Get getCurrentDate()

Here you can find the source of getCurrentDate()

Description

get Current Date

Declaration

@SuppressLint("SimpleDateFormat")
    public static String getCurrentDate() 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;
import android.annotation.SuppressLint;

public class Main {
    @SuppressLint("SimpleDateFormat")
    public static String getCurrentDate() {
        Date date = new Date(System.currentTimeMillis());
        SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        //      sdf.setTimeZone(TimeZone.getTimeZone("UTC"));

        String text = sdf.format(date);

        return text;
    }/*from  ww w  . j a  v a  2 s . c om*/
}

Related

  1. getTodayEndTime()
  2. getTodayStartTime()
  3. today()
  4. todayWithHour()
  5. getDate()
  6. getNowDate()