| Summary: | date's year not changed when using using addDays() to go from one year to another | ||
|---|---|---|---|
| Product: | z_Archived | Reporter: | Tom B <tmbarans> |
| Component: | EDT | Assignee: | Project Inbox <edt.javagen-inbox> |
| Status: | CLOSED FIXED | QA Contact: | |
| Severity: | normal | ||
| Priority: | P3 | CC: | jeffdouglas, tmbarans |
| Version: | unspecified | ||
| Target Milestone: | --- | ||
| Hardware: | PC | ||
| OS: | Windows XP | ||
| Whiteboard: | |||
CORRECTION: The problem occurs when the new date is supposed to be a different year when in fact the year does not change
e.g.
function runAssignmentFunction14(){@Test}
myDate date = "12-31-2011";
myDate2 date = "01-01-2012";
actual=myDate.addDays(1);
LogResult.assertDateEqual("addition non-leap year to non-leap year", myDate2,actual);
end
FAILED - addition non-leap year to non-leap year - Failed: Expected value = '2012-01-01' Actual value = '2011-01-01 00:00:00.000000'
fixed verified for EGL Development Tools (EDT) 0.7.0.v201110232102 Closing this work item |
Build Identifier: 20110218-0911 When using myDate.addDays() method, an incorrect result is returned when adding or subtracting 365 days (i.e. one year). Either the returned date is the same as the original or it is different by one day rather than one year Reproducible: Always Steps to Reproduce: Generate this to Java const marFirst1999 date = "03-01-1999"; function hello(){@Test} result date = marFirst1999.addDays(-365); Syslib.writestdout(result); end Expected value = '1998-03-01' Actual value = '1999-03-01 00:00:00.000000 see EDate002.egl in org.eclipse.edt.eunit.test/api.eglx_lang