Java tutorial
//package com.java2s; //License from project: Apache License import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Locale; public class Main { public static String getStrDay() { Calendar now = Calendar.getInstance(); return new SimpleDateFormat("yyyy-MM-dd", Locale.US).format(now.getTime()); } }