We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
For future discussion.
Current TimeStampParser allows parsing as timestamp the following data.
%Y-%m-%d %H:%M:%S
2015-01-27 19:23:49 aaa
aaa is non-time data
Some users want to use TimestampParser strictly. It is mean that a user wants to error when above data parsed.
[1] pry(main)> Date._strptime("2017/05/22 23:12:34","%Y/%m/%d %H:%M:%S") => {:year=>2017, :mon=>5, :mday=>22, :hour=>23, :min=>12, :sec=>34} [2] pry(main)> Date._strptime("2017/05/22 23:12:34 hogehogehoge","%Y/%m/%d %H:%M:%S") => {:year=>2017, :mon=>5, :mday=>22, :hour=>23, :min=>12, :sec=>34, :leftover=>" hogehogehoge"}
The text was updated successfully, but these errors were encountered:
@hiroyuki-sato Does strictly mode mean ignore_leftover flag? I'm still not sure that TimestampParser needs to care about leftover only.
strictly mode
ignore_leftover
TimestampParser
leftover
Sorry, something went wrong.
@muga Thank you for replying. YES, It's mean ignore_leftover flag.
The strict mode mean if the :leftover isn't nil, raise an exception. Or return nil.
strict mode
:leftover
I'm not sure much about left side.
If I put no date string on the left side ex) aaa 2017/05/22 23:12:34. It returned nil.
aaa 2017/05/22 23:12:34
Date._strptime("aaa 2017/05/22 23:12:34","%Y/%m/%d %H:%M:%S") => nil
It would be considered in embulk-util-timestamp.
embulk-util-timestamp
No branches or pull requests
For future discussion.
Current TimeStampParser allows parsing as timestamp the following data.
%Y-%m-%d %H:%M:%S
.2015-01-27 19:23:49 aaa
(aaa is non-time data
)Some users want to use TimestampParser strictly.
It is mean that a user wants to error when above data parsed.
JRuby behavior
Ref(Written in Japanese)
The text was updated successfully, but these errors were encountered: