//??????????
public String getNowTime(String dateformat){
Date   now   =   new   Date();
SimpleDateFormat   dateFormat   =   new   SimpleDateFormat(dateformat);//?????????????????
String  hehe  = dateFormat.format(now);
return hehe;
}
// ???????????????????????
private int getMondayPlus() {
Calendar cd = Calendar.getInstance();
// ??????????????????????????????????......
int dayOfWeek = cd.get(Calendar.DAY_OF_WEEK)-1;         //??????й???????????????????1
if (dayOfWeek == 1) {
return 0;
} else {
return 1 - dayOfWeek;
}
}
//?????????????
public String getMondayOFWeek(){
weeks = 0;
int mondayPlus = this.getMondayPlus();
GregorianCalendar currentDate = new GregorianCalendar();
currentDate.add(GregorianCalendar.DATE?? mondayPlus);
Date monday = currentDate.getTime();
DateFormat df = DateFormat.getDateInstance();
String preMonday = df.format(monday);
return preMonday;
}
//???????????????????
public String getSaturday() {
int mondayPlus = this.getMondayPlus();
GregorianCalendar currentDate = new GregorianCalendar();
currentDate.add(GregorianCalendar.DATE?? mondayPlus + 7 * weeks + 6);
Date monday = currentDate.getTime();
DateFormat df = DateFormat.getDateInstance();
String preMonday = df.format(monday);
return preMonday;
}