-
Notifications
You must be signed in to change notification settings - Fork 131
Add support for RFC 3339 style time #248
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
Changes from 1 commit
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
| Original file line number | Diff line number | Diff line change |
|---|---|---|
|
|
@@ -103,4 +103,19 @@ def test_builtin_date_time_converter_iso8601_utc | |
| assert_equal(datetime, | ||
| CSV::Converters[:date_time][iso8601_string]) | ||
| end | ||
|
|
||
| def test_builtin_date_time_converter_near_iso | ||
|
Member
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Could you split this test to multiple tests like existing |
||
| [ "2018-01-14 22:25", | ||
| "2018-01-14 22:25:19", | ||
| "2018-01-14 22:25:19.1", | ||
| "2018-01-14 22:25:19.1+09:00", | ||
| "2018-01-14 22:25:19+09:00", | ||
| "2018-01-14 22:25:19Z", | ||
| ].each do |string| | ||
| datetime = DateTime.parse(string) | ||
| assert_equal(datetime, | ||
| CSV::Converters[:date_time][string]) | ||
| end | ||
| end | ||
|
|
||
|
kou marked this conversation as resolved.
Outdated
|
||
| end | ||
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't know if this meets a condition mentioned in this comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@kou
Can you help me?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@thyresias It seems that this approach is the latter approach not the former approach. Is it intentional?
Anyway, could you refer RFC 3339 instead of "near-ISO" for "YYYY-MM-DD hh:mm:ss" format?
This rejects
"YYYY-MM-DD\thh:mm:dd"that is accepted without this change. Could you use[T\s]instead of[T ]?