Java Now now()

Here you can find the source of now()

Description

now

License

Open Source License

Declaration

public synchronized static String now() 

Method Source Code


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

import java.util.Calendar;

import java.util.Locale;
import java.text.SimpleDateFormat;

public class Main {
    public static final String DATE_FORMAT_NOW = "[dd MMMMM yyyy aaa hh:mm:ss.SSS z]";
    public static final Locale DATE_LOCALE = Locale.UK;

    public synchronized static String now() {
        return new SimpleDateFormat(DATE_FORMAT_NOW, DATE_LOCALE).format(Calendar.getInstance().getTime());
    }/*from  www  . j  a va  2 s  .  co m*/
}

Related

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