DateTime function to convert to time.Time value (close #115)#116
DateTime function to convert to time.Time value (close #115)#116icholy merged 3 commits intoadrianmo:masterfrom
Conversation
|
@aldas are you ok with this API? |
There was a problem hiding this comment.
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) TimeI 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.