Opened 17 years ago
Closed 17 years ago
#605 closed defect (fixed)
TextToDate doesn't work with month names
Reported by: | Pedro Gea | Owned by: | Jorge |
---|---|---|---|
Priority: | highest | Milestone: | |
Component: | TimeSetAlgebra | Version: | 1.1.6 |
Severity: | normal | Keywords: | |
Cc: |
Description
The expression:
Date TextToDate("12-Feb-2008","%d-%n-%Y");
returns:
y2008m01d12
I think the bug is in the follow lines of "dtealgeb.cpp":
216 if(n[0])
217 {
218 n[3] = '\0';
219 for(m=1;(m<=12)&&(shortMonth_[m-1][0]!=n)&&(shortMonth_[m-1][1]!=n);m++){}
220 if(m==13) { m=1; }
221 }
I think the string comparison (shortMonth_[x][x]!=n) isn't correct.
That looks like a pointer comparison.
Change History (4)
comment:1 Changed 17 years ago by
Owner: | changed from Víctor de Buen Remiro to Jorge |
---|
comment:2 Changed 17 years ago by
Status: | new → assigned |
---|
comment:3 Changed 17 years ago by
(In reply to comment #1)
Thanks for the report and the comment clarifying to the solution.
i meant "clarifying the solution"
comment:4 Changed 17 years ago by
bug_file_loc: | → http://cvs.tol-project.org/viewcvs.cgi/tol_tests/tol/Bugzilla/bug_000605/ |
---|---|
Resolution: | → fixed |
Status: | assigned → closed |
Thanks for the report and the comment clarifying to the solution.