-
Notifications
You must be signed in to change notification settings - Fork 17
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
date arithmetic returns date instead of number #866
Comments
Removing this code makes these tests pass (though decimal There is one karma test that will start failing which is:
Adding another test like Though some other mocha tests are failing. Tbc (probably requires changing expected results to numbers). |
I added the above tests to the |
* Fixed date arithmetic returning date instead of number, closes #141
These (new) tests fail:
Both ODK Collect and the old Enketo evaluator return a number (as string), following the XPath rule that the presence of the operator (+) causes both left and right operands to be converted to a number.
I suspect, I may be responsible for this change, so sorry about that. I am hoping the fix may actually simplify the code.
Note, that if behind the scenes, the number value is not an integer (but a decimal), I think it might be pragmatic to consider that a separate (timezone) issue in either Collect or Enketo (and leave it for later).
The text was updated successfully, but these errors were encountered: