import java.text.DateFormat;
import java.text.ParseException;
import java.text.SimpleDateFormat;
import java.util.Calendar;
import java.util.Date;
class Test{
Date date1
= df.
parse("10/08/2013"); Date date2
= df.
parse("21/08/2013"); cal1.setTime(date1);
cal2.setTime(date2);
int numberOfDays = 0;
while (cal1.before(cal2)) {
numberOfDays++;
}else {
}
}
System.
out.
println(numberOfDays
); }
}
aW1wb3J0IGphdmEudGV4dC5EYXRlRm9ybWF0OwppbXBvcnQgamF2YS50ZXh0LlBhcnNlRXhjZXB0aW9uOwppbXBvcnQgamF2YS50ZXh0LlNpbXBsZURhdGVGb3JtYXQ7CmltcG9ydCBqYXZhLnV0aWwuQ2FsZW5kYXI7CmltcG9ydCBqYXZhLnV0aWwuRGF0ZTsKY2xhc3MgVGVzdHsKICAgIHB1YmxpYyBzdGF0aWMgdm9pZCBtYWluKFN0cmluZ1tdIGFyZ3MpIHRocm93cyBQYXJzZUV4Y2VwdGlvbnsKICAgICAgICAgRGF0ZUZvcm1hdCBkZiA9IG5ldyBTaW1wbGVEYXRlRm9ybWF0KCJkZC9NTS95eXl5Iik7CiAgICAgICAgRGF0ZSBkYXRlMSA9IGRmLnBhcnNlKCIxMC8wOC8yMDEzIik7CiAgICAgICAgRGF0ZSBkYXRlMiA9IGRmLnBhcnNlKCIyMS8wOC8yMDEzIik7CiAgICAgICAgQ2FsZW5kYXIgY2FsMSA9IENhbGVuZGFyLmdldEluc3RhbmNlKCk7CiAgICAgICAgQ2FsZW5kYXIgY2FsMiA9IENhbGVuZGFyLmdldEluc3RhbmNlKCk7CiAgICAgICAgY2FsMS5zZXRUaW1lKGRhdGUxKTsKICAgICAgICBjYWwyLnNldFRpbWUoZGF0ZTIpOwoKICAgICAgICBpbnQgbnVtYmVyT2ZEYXlzID0gMDsKICAgICAgICB3aGlsZSAoY2FsMS5iZWZvcmUoY2FsMikpIHsKICAgICAgICAgICAgaWYgKChDYWxlbmRhci5TQVRVUkRBWSAhPSBjYWwxLmdldChDYWxlbmRhci5EQVlf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