Java Now now()

Here you can find the source of now()

Description

Returns the current system date

License

Apache License

Declaration

public static Date now() 

Method Source Code

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

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

public class Main {
    /**/*w w w  .  j  a  v a 2 s  .co m*/
     * Returns the current system date
     */
    public static Date now() {
        return new Date();
    }

    /**
     * Returns the current system date as string with the specified format
     */
    public static String now(String pattern) {
        return new SimpleDateFormat(pattern).format(now());
    }
}

Related

  1. now()
  2. now()
  3. now()
  4. now()
  5. now()
  6. now()
  7. now()
  8. now()
  9. now()