-
Notifications
You must be signed in to change notification settings - Fork 36
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
dateFromFields and timeFromFields documentation could be improved #65
Comments
Ahh yes, one of my pet peeves with the documentation output, it discards the actual names of the parameters, though to be fair with currying as in the I have added a call signature to each one for now published in 9.3.1. |
If I add aliases like the following one for Year and use them. type alias Year =
Int
dateFromFields : Year -> Month -> Day -> Hour -> Minute -> Second -> Millisecond -> Date The consequence is a major version bump due to the interface changing. Have attached documenation.json.txt which can be loaded into http://package.elm-lang.org/help/docs-preview if you want a look at how the documentation looks using these aliases in Create module. |
Just had a suggestion that maybe a record format dateFromFields with named record fields is another option. |
The record format actually sounds like the best option.
we would have something a lot more readable:
Contra: we lose currying, but it's not very useful in this case anyways. Thank you for considering my suggestions. I'm pretty new to elm and working with dates tripped me up a bit. |
The documentation only contains the signature of the function, but no usage example or explanation of each parameter.
What are all those Ints? What does each mean? Based on this documentation a user might try to create a date in the US format like this:
dateFromFields 02 Feb 2018 13 52 0 0 0
I also cannot tell what the last two numbers are without looking at the source.
The same applies to timeFromFields.
The text was updated successfully, but these errors were encountered: