Here you can find the source of nowFormat(String format)
public static String nowFormat(String format)
//package com.java2s; /**// www .j a va 2 s. co m * Copyright (c) 2014 Sa?l Pi?a <sauljabin@gmail.com>, Jorge Parra <thejorgemylio@gmail.com>. * <p> * This file is part of SimulationP3DX. * <p> * SimulationP3DX is licensed under The MIT License. * For full copyright and license information please see the LICENSE file. */ import java.text.SimpleDateFormat; import java.util.Calendar; public class Main { public static String nowFormat(String format) { SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(Calendar.getInstance().getTime()); } }