#472 closed defect (invalid)
DatCh doesn´t work right
Reported by: | imendez | Owned by: | Víctor de Buen Remiro |
---|---|---|---|
Priority: | high | Milestone: | |
Component: | TimeSetAlgebra | Version: | head |
Severity: | major | Keywords: | |
Cc: |
Description
Hi, this code returns a series with a wrong initial date:
TimeSet tms = C-D(1)*M(1)-D(25)*M(12);
Serie sr = SubSer(CalInd(In(y1999, y2007), Diario), y1999, y2007);
Date f = First(sr);
Serie sr_d = DatCh(sr, tms, FirstS);
Date f_d = First(sr_d);
The variable "f_d" is y1998m12d31 instead of y1999.
I think this bug can be related to bugs #79, #154 and #354.
Note: I have tested this code under this versions:
TOLBase: 1.1.5. (cvs trunk)
TOL: 1.1.5. (Feb 15 2007 13:53:01)
Regards.
Change History (6)
comment:1 Changed 18 years ago by
Owner: | changed from danirus to Víctor de Buen Remiro |
---|
comment:2 Changed 18 years ago by
Status: | new → assigned |
---|
comment:3 Changed 18 years ago by
Sorry but y1999 = y1999m01d01 is not a date of tms = C-D(1)*M(1)-D(25)*M(12)
So DatCh(sr, tms, FirstS) cannot start in a date that doesn't belong to tms.
Standard behaviour in this case is to search the previous date in tms, it's to say 1998m12d31.
If you are agree I will set to INVALID this bug
Thanks to report anywhay
comment:4 Changed 18 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000472 |
---|---|
Resolution: | → invalid |
Status: | assigned → closed |
In the same way, last date of sr_d is y2007m01d02 due to y2007 is not a date of tms.
A new test has been added to check this behaviour
http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000472
comment:6 Changed 17 years ago by
In relation with Bug 526, the test of this bug must be changed due to last date of sr_d cannot be y2007m01d02 but y2006m12d31 due sr has no data after y2007m01d01
We are working about this bug
Thanks to report it