Here you can find the source of getCurrDay()
public static int getCurrDay()
//package com.java2s; //License from project: Apache License import java.util.Calendar; import java.util.Locale; public class Main { public static int getCurrDay() { Calendar cal = Calendar.getInstance(Locale.CHINA); cal.setTime(getNowDate());//w w w. ja va 2 s. c o m return cal.get(5); } public static java.sql.Date getNowDate() { java.util.Date date = new java.util.Date(); return new java.sql.Date(date.getTime()); } }