You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Is the naming convention for fromTime and toTime reversed? Intuitively I expect toTime to return a Time:
toTime : Int -> Time
and fromTime to accept a Time as an input:
fromTime : Time -> Int
much like the fromPosix and toPosix functions. The actual API for Time is the opposite.
Perhaps fromInt/toInt? There is some precedent for fromMillis/toMillis in the elm/Time package.
I'm still new to Elm, so if you're willing to share your mental model it would help me out quite a bit. I see that you've touched these functions recently in #9 , so perhaps there's some reasoning behind the convention that I'm not aware of.
Thanks!
The text was updated successfully, but these errors were encountered:
Is the naming convention for
fromTime
andtoTime
reversed? Intuitively I expecttoTime
to return aTime
:and
fromTime
to accept aTime
as an input:much like the
fromPosix
andtoPosix
functions. The actual API forTime
is the opposite.Perhaps
fromInt
/toInt
? There is some precedent forfromMillis
/toMillis
in theelm/Time
package.I'm still new to Elm, so if you're willing to share your mental model it would help me out quite a bit. I see that you've touched these functions recently in #9 , so perhaps there's some reasoning behind the convention that I'm not aware of.
Thanks!
The text was updated successfully, but these errors were encountered: