fork download
  1. import java.util.Calendar;
  2.  
  3. public class Main{
  4.  
  5. public static void main(String ar[]){
  6. Calendar cal = Calendar.getInstance();
  7. int currentDay = cal.get(Calendar.DAY_OF_WEEK);
  8. int leftDays= Calendar.SATURDAY - currentDay;
  9. cal.add(Calendar.DATE, leftDays);
  10. System.out.println(cal.getTime());
  11.  
  12. }
  13.  
  14. }
Success #stdin #stdout 0.05s 246080KB
stdin
Standard input is empty
stdout
Sat May 26 06:00:50 GMT 2012