Here you can find the source of getCurrentDay(int model)
public static String getCurrentDay(int model)
//package com.java2s; import java.text.SimpleDateFormat; import java.util.Date; public class Main { public static String getCurrentDay(int model) { return getDateStringForFormat(model == 0 ? "d" : "dd"); }/* ww w . j a v a 2s. com*/ public static String getDateStringForFormat(String format) { SimpleDateFormat sdf = new SimpleDateFormat(format); return sdf.format(new Date()); } }