-
Notifications
You must be signed in to change notification settings - Fork 61
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
Add time datatype, and maybe date too #214
Comments
Instead of adding yet another data type, what about using the |
Possibly, but that may be confusing, since the "format" needs to be according to ISO 8601. Values of
No to open a can of worms, but |
An alternative approach (just brainstorming here) is to make |
From the Convention description, it seems that $format is being used to further describe the datatype. "$format | Specifies restrictions or options for the given data type" I agree, we should probably add datatypes for date, time and interval. We already have datetime and duration. Correct me if I am wrong, but would the datatime datatype already hand just date or just time? |
An additional consideration is that
The Java 8 Time API is a good reference.
|
There are use cases where only the
time
portion of adatetime
property is relevant, such as in a daily schedule. Using thedatetime
datatype is possible, but would result in an infinite number of values that would represent the same time (with different dates). The reverse could also be said about only needing the date portion, but that can more easily be resolved by setting the time portion to zero. In either case, ISO 8601 formats are established.On the implementation side, JavaScript does not have a time class (though the HTML
input type=time
exists), but Python does (datetime.time
). In lieu of researching other languages, would this cause heartburn with any other implementations?The text was updated successfully, but these errors were encountered: