-
Notifications
You must be signed in to change notification settings - Fork 79
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
DateTime function to convert to time.Time value (close #115) #116
Conversation
@aldas are you ok with this API? |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Only thing here I'm not sure is - should referenceYear
be first parameter as it is optional and d
and t
are "main" things here we are combining but they come after "optional" parameter.
but I trust you more than myself when it comes to creating designing reasonable APIs.
so LGTM
That's a valid point; I guess it's more conventional to have optional arguments last. Refactored and pushed :) |
They sorry for the delay, I haven't had access to my computer for the past couple days.
The nmea.DateTime(d, t) I put the func Date(year int, month Month, day, hour, min, sec, nsec int, loc *Location) Time I won't die on this hill though. @mholt care to be the tie breaker on this? |
This reverts commit c607125.
I guess we technically could do But I think your point about "most significant unit" is a good one, and I like the parity with It's also probably best for this value to be explicitly set. Psychologically speaking, having it be the first argument may be a good way to encourage that. I just switched it back. |
Thank you both!! |
This change adds a DateTime function as discussed in #115.