close Warning: Can't synchronize with repository "(default)" (/var/svn/tolp does not appear to be a Subversion repository.). Look in the Trac log for more information.

Opened 18 years ago

Closed 18 years ago

Last modified 17 years ago

#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 Víctor de Buen Remiro

Owner: changed from danirus to Víctor de Buen Remiro

We are working about this bug
Thanks to report it

comment:2 Changed 18 years ago by Víctor de Buen Remiro

Status: newassigned

comment:3 Changed 18 years ago by Víctor de Buen Remiro

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 Víctor de Buen Remiro

bug_file_loc: http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000472
Resolution: invalid
Status: assignedclosed

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:5 Changed 18 years ago by imendez

Yes, I agree you. I apologize for the inconvenience.

Regards.

comment:6 Changed 17 years ago by Víctor de Buen Remiro

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

Note: See TracTickets for help on using tickets.