Java Now now()

Here you can find the source of now()

Description

Returns the current Date/Time in "iTunes time format"

License

Open Source License

Declaration

public static final String now() 

Method Source Code

//package com.java2s;
/*******************************************************************************
 * Copyright (c) 2013 Jens Kristian Villadsen.
 * All rights reserved. This program and the accompanying materials
 * are made available under the terms of the GNU Public License v3.0
 * which accompanies this distribution, and is available at
 * http://www.gnu.org/licenses/gpl.html/*from   w  w w . jav  a 2s  .com*/
 * 
 * Contributors:
 *     Jens Kristian Villadsen - Lead developer, owner and creator
 ******************************************************************************/

import java.text.SimpleDateFormat;

import java.util.Date;

import java.util.Locale;

public class Main {
    private final static SimpleDateFormat formatter = new SimpleDateFormat(
            "EEE, d MMM yyyy hh:mm:ss z", Locale.US);

    /**
     * Returns the current Date/Time in "iTunes time format"
     */
    public static final String now() {
        return formatter.format(new Date());
    }
}

Related

  1. makeUniqueName(final String[] knownNames, final String pattern)
  2. now()
  3. now()
  4. now()
  5. now()
  6. now()
  7. now()
  8. now()
  9. now()