Java Date Now currentDate()

Here you can find the source of currentDate()

Description

current Date

License

Open Source License

Declaration

public static String currentDate() 

Method Source Code


//package com.java2s;
//License from project: Open Source License 

import java.text.SimpleDateFormat;
import java.util.Date;

public class Main {
    public static String currentDate() {
        SimpleDateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        return dateFormat.format(new Date());
    }//from  w w  w. j  a  v a 2  s  .  co m
}

Related

  1. currentDate()
  2. currentDate()
  3. currentDate()
  4. currentDate()
  5. currentDate()
  6. currentDate()
  7. currentDate(int dateStyle)
  8. currentDate(String format)
  9. currentDate(String format, Locale locale)