-
Notifications
You must be signed in to change notification settings - Fork 26
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
clarify what today() and now() return exactly #56
Comments
Oops, yes, you're right about it needing to be language-agnostic. |
XForms equivalents are |
Oh totally didn't realize that it is in XForms. Your "date object" suggestion makes sense to me. I think XPath has no way of calculating So maybe we need to describe in the spec how a datetime string is converted to a "Number" and "String" type (in XPath terminology) internally in the XPath evaluator, so independent from the datatype of the question. |
Err, right. XPath. So XPath does define a format for date and time. I didn't totally understand what you said about |
(I'm just thinking out loud, this date/datetime stuff is very confusing to me). I meant that an XPath 1.0 evaluator doesn't have a built-in date-like type (it only has Number, String, Nodeset and Boolean, and converts string values to one of these depending on the type of function/operator). So if you're sending an expression such as So I wonder if we could write in our spec:
Would that correspond to how JavaRosa does things, or have I misunderstood? Maybe a more realistic example would be the expression P.S. in hindsight, I think we should have obligated users to wrap dates in date() for comparisons and arithmetic. |
Hello @MartijnR, you claimed this issue to work on it, but this issue and any referenced pull requests haven't been updated for 10 days. Are you still working on this issue? If so, please update this issue by leaving a comment on this issue to let me know that you're still working on it. Otherwise, I'll automatically remove you from this issue in 5 days. If you've decided to work on something else, simply comment Thank you for your valuable contributions to Open Data Kit! |
@lognaturel writes:
It should be clear what should be returned by these functions at least for datatypes: date, time, datetime, integer, decimal (and string? - that one scares me).
This should be done in a language-agnostic manner (no references to Java or JavaRosa).
The text was updated successfully, but these errors were encountered: