Posted by Anonymous Fri 2nd Mar 2007 23:03 - Syntax is Java 5 - 134 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
Description:
Second test fails... WHY!?
Second test fails... WHY!?
-
String someDate = "Fri Feb 10 01:59:59 CST 2007";
-
date = formatter.parse(someDate);
-
-
DateRange range = new DateRange("02/05/2007", "02/10/2007");
-
assertTrue("Date should be within range", range.includes(date));
-
}
-
-
String someDate = "Fri Feb 10 02:00:00 CST 2007";
-
date = formatter.parse(someDate);
-
-
DateRange range = new DateRange("02/05/2007", "02/10/2007");
-
assertTrue("Date should be within range", range.includes(date));
-
}
-
-
-
-
---- The DateRange class
-
-
import java.util.;
-
-
public class DateRange {
-
private _start;
-
private _end;
-
-
_start = DEFAULT_FORMAT.parse(start);
-
_end = DEFAULT_FORMAT.parse(end);
-
}
-
-
public boolean includes( date) {
-
return _start.before(date) && _end.after(date);
-
}
-
-
}
PermaLink to this entry https://pastebin.co.uk/11316
Posted by Anonymous Fri 2nd Mar 2007 23:03 - Syntax is Java 5 - 134 views
Download | New Post | Modify | Hide line numbers
Download | New Post | Modify | Hide line numbers
Comments: 0