Java Date Now getCurrentStringDate()

Here you can find the source of getCurrentStringDate()

Description

get Current String Date

License

Apache License

Declaration

public static String getCurrentStringDate() 

Method Source Code

//package com.java2s;
//License from project: Apache License 

import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.Locale;

public class Main {
    /**/*from   w w w. java2 s  .co  m*/
     * yyyy-MM-dd Comment for <code>onlyDateFmt</code>
     */
    public static final SimpleDateFormat onlyDateFmt = new SimpleDateFormat("yyyy-MM-dd", Locale.CHINA);

    public static String getCurrentStringDate() {
        return onlyDateFmt.format(getCurrentDate());
    }

    public static Date getCurrentDate() {
        return new Date(System.currentTimeMillis());
    }
}

Related

  1. getCurrentODSDate()
  2. getCurrentPlainDate()
  3. getCurrentQuarter()
  4. getCurrentSecond()
  5. getCurrentString(String pattern)
  6. getCurrentStringDate(String pattern)
  7. getCurrentStringDateYMD()
  8. getCurrentStrTimeMills()
  9. getCurrentTime()