Android Calendar Get getDateAsDirName()

Here you can find the source of getDateAsDirName()

Description

get Date As Dir Name "yyyy-MM-dd"

Declaration

public static final String getDateAsDirName() 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;
import java.util.Calendar;

public class Main {
    public static final String getDateAsDirName() {
        Calendar cal = Calendar.getInstance();
        java.text.SimpleDateFormat sdf = new SimpleDateFormat("yyyy-MM-dd");
        String cdate = sdf.format(cal.getTime());
        return cdate;
    }/*from  w w  w.  j ava  2  s.c  o m*/
}

Related

  1. getCurrentWeek()
  2. getCurrentWeek(Calendar cal)
  3. getDate()
  4. getDate()
  5. getDate(Calendar c)
  6. getDateAsF()
  7. getDateAss()
  8. getDateMin()
  9. getDay()