-
Notifications
You must be signed in to change notification settings - Fork 859
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
Allow space to seperate date and time as per RFC3339 #424
Comments
But doesn't the RFC 3339 specify that "T" must be present between date and time? Your change would effectively make toml Datetime format not compliant with the RFC. |
Not necessarily..
|
That's right, but the RCF 3339 removes that possibility to remove ambiguity (see Apendix A) and toml specs follow the RFC not the ISO.
|
I'm all for making this mandatory, displaying a different variant should be left to the user interface / front-end side. |
ISO 8601 allows the delimiter T to be omitted. I think this means that you may write: This is a different issue from allowing space in addition to T. The RFC specifically mentions that applications may allow space for readability. See https://tools.ietf.org/html/rfc3339#section-5.6 This also introduces no ambiguity in the grammar, and is a commonly used format compared to the T-variant, as seen in the number of search results mentioned above. I think readability is a very important part of being "obvious". |
With the recent exciting addition of better support for time and date with #414, I think it's time to reconsider the decision to not to allow spaces in date-times (see #279).
For example, compare the time of the moon landing with/without T:
Another famous (less pleasant) date:
Seems to me that allowing a space as well would fit the "obvious" part of TOML very well here. The format appears to be several orders of magnitude more popular. In fact, I'd go so far as saying that using T in datetimes is a rather obscure format used only by programmers who have read the Wikipedia page of ISO 8601/RFC3339, as opposed to normal users. While I personally find using a T rather neat, it's not so good for readability.
As for complexity, I believe the addition of allowing a space between date and time
("T" / " ")
would be trivial.The text was updated successfully, but these errors were encountered: