Java Today today()

Here you can find the source of today()

Description

today

License

Open Source License

Return

current date with respect to the format yyyy-MM-dd

Declaration

public static String today() 

Method Source Code

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

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

public class Main {
    /**//w ww  .ja v  a  2 s  . c  o m
     * @return current date with respect to the format yyyy-MM-dd
     */
    public static String today() {

        DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd");
        Date date = new Date();
        return dateFormat.format(date);
    }
}

Related

  1. today()
  2. toDay()
  3. today()
  4. today()
  5. today()
  6. Today()
  7. today()
  8. today()
  9. today()