Here you can find the source of getNowDateString(String sign)
public static String getNowDateString(String sign)
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getNowDateString(String sign) { SimpleDateFormat formatter; formatter = new SimpleDateFormat("yyyy" + sign + "MM" + sign + "dd"); String dateString = formatter.format(new Date()); return dateString.trim(); }// w w w. java2 s . c o m }