2019独角兽企业重金招聘Python工程师标准>>>
static String[] weeks = { "日", "一", "二", "三", "四", "五", "六" };public static void main(String[] args) {Calendar c = Calendar.getInstance();int week = c.get(Calendar.WEEK_OF_MONTH);//获取是本月的第几周int day = c.get(Calendar.DAY_OF_WEEK);//获致是本周的第几天地, 1代表星期天...7代表星期六System.out.println("今天是本月的第" + week + "周");System.out.println("今天是星期" + weeks[day-1]);
}