Java Date Now getNowDate()

Here you can find the source of getNowDate()

Description

Gets the now date.

License

Apache License

Return

the now date

Declaration

public static String getNowDate() 

Method Source Code

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

import java.text.DateFormat;

import java.util.GregorianCalendar;
import java.util.Locale;

public class Main {
    /**/*from w  w w  .ja va2s . co m*/
     * Gets the now date.
     *
     * @return the now date
     */
    public static String getNowDate() {
        GregorianCalendar gcNow = new GregorianCalendar();
        java.util.Date dNow = gcNow.getTime();
        DateFormat df = DateFormat.getDateInstance(DateFormat.MEDIUM, Locale.SIMPLIFIED_CHINESE);
        return df.format(dNow);
    }
}

Related

  1. getNowDate()
  2. getNowDate()
  3. getNowDate()
  4. getNowDate()
  5. getNowDate()
  6. getNowDate()
  7. getNowDate(String format)
  8. getNowDate(String format)
  9. getNowDateShort()