Java tutorial
//package com.java2s; import java.util.Date; import java.text.SimpleDateFormat; import java.util.Locale; public class Main { static String currentDate() { SimpleDateFormat sdf = new SimpleDateFormat("yyyy.MM.dd", Locale.US); return sdf.format(new Date()); } }