Android Date to String Convert getCurrentDateStrs()

Here you can find the source of getCurrentDateStrs()

Description

get Current Date Strs

Declaration

public static String getCurrentDateStrs() 

Method Source Code

//package com.java2s;

import java.text.SimpleDateFormat;

import java.util.Date;

public class Main {
    private static final String ONLY_DATE_FORMAT_s = "yyyy-MM-dd";

    public static String getCurrentDateStrs() {
        SimpleDateFormat dateFormat = new SimpleDateFormat(
                ONLY_DATE_FORMAT_s);/*from   w  w  w . ja v  a  2 s.  co m*/
        Date d = new Date(System.currentTimeMillis());
        return dateFormat.format(d);
    }
}

Related

  1. dateToIsoDateString(@Nullable Date date, @NotNull DateFallback fallback)
  2. formatDate(Date date, String format)
  3. formatDate(String format, Date date)
  4. formatDate(final Date date)
  5. getCurrentDateStr()
  6. getCurrentTimeStr()
  7. getDateByFormatedString(String date)
  8. getDateTimeString(Date date)
  9. getDateTimeString(Date date, int format, Locale currentLocale)