Closed adius closed 7 years ago
I added all 3 fields that Utils.isoWeek can return as format fields in release 9.1.2.
Ah, I see, thanks. I was looking for some convenience helper a la utcIsoString
.
Btw: You should setup some type alias to make the documentation easier to read.
For example
format : Config -> FormatString -> Date -> FormattedDate
instead of
format : Config -> String -> Date -> String
That is a good idea.
Though IMO if the documentation extraction used the name of the parameters rather as well as the types then the need for alias types has not got the value any more.
On Mon, Sep 11, 2017 at 5:23 PM, Adrian Sieber notifications@github.com wrote:
Ah, I see, thanks. I was looking for some convenience helper a la utcIsoString.
Btw: You should setup some type alias to make the documentation easier to read.
For example
format : Config -> FormatString -> Date -> FormattedDate
instead of
format : Config -> String -> Date -> String
— You are receiving this because you modified the open/close state. Reply to this email directly, view it on GitHub https://github.com/rluiten/elm-date-extra/issues/54#issuecomment-328440678, or mute the thread https://github.com/notifications/unsubscribe-auth/AAo7CHxxXe85V9MWJR5IIk9R8JRIsKv-ks5shN_6gaJpZM4PSStB .
But many (including me) use shortcut words as parameter names, as the signature already says what that parameter exactly is. e.g.
format : Config -> FormatString -> Date -> FormattedDate
format conf fmtStr date fmtedDate = …
And this would make a shitty documentation. (I'm exaggerating here a little, but you know what I mean…)
There is already
Utils.isoWeek
, but the corresponding formatter is missing.