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
It looks like strptime and strftime behaviour for dates before 1900 varies across platforms, so I think we should throw an error on such inputs.
strptime
strftime
(tempo_dev@yooki)13> tempo:parse(<<"%Y">>, {unix, <<"1505">>}). %% OS X {error,format_mismatch}
The text was updated successfully, but these errors were encountered:
Besided undefined behaviour there is an obvious bug there:
(tempo_dev@si14-laptop)6> tempo:parse(<<"">>, <<"">>, unix). {ok,0.0} <---- WAT (tempo_dev@si14-laptop)7> tempo:parse(<<"%Y">>, {unix, <<"1505">>}). {ok,-14674003200.0}
Sorry, something went wrong.
What kind of behaviour would you expect? I'd say badarg for both of them.
badarg
Yup.
The first case is fixed in 593cd5c, the latter is hard to validate, unfortunately. Any suggestions?
No branches or pull requests
It looks like
strptime
andstrftime
behaviour for dates before 1900 varies across platforms, so I think we should throw an error on such inputs.The text was updated successfully, but these errors were encountered: