Calendar
Calendar calendar = Calendar.getInstance();
calendar.setTime(date); //date设置Calendar
//毫秒时间戳设置Calendar
calendar.setTimeInMillis(timestamp);
//设置周一为每周的第一天
calendar.setFirstDayOfWeek(Calendar.MONDAY);
//指定字段偏移
calendar.add(calendarField, offset);
//日期所在的周数
calendar.get(Calendar.WEEK_OF_YEAR);
//该周的第一天
calendar.set(Calendar.DAY_OF_WEEK, calendar.getFirstDayOfWeek() );
//该周的最后一天
calendar.set(Calendar.DAY_OF_WEEK, calendar.getFirstDayOfWeek() + 6);
calendar.get(Calendar.YEAR);;//年
calendar.get(Calendar.MONTH) +1;//月
calendar.get(Calendar.DATE);//日
//时(12小时制)
calendar.get(Calendar.HOUR);
//时(24小时制)
calendar.get(Calendar.HOUR_OF_DAY);
calendar.get(Calendar.MINUTE); //分
calendar.get(Calendar.SECOND); //秒
SimpleDateFormat
String str = new SimpleDateFormat("yyyy-MM-dd").format(new Date())
Date date = new SimpleDateFormat("yyyy-MM-dd").parse("1970-01-01")