We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
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
Could you please update the documentation for IsSame() and its similar functions?
IsSame()
I noticed that this will not always return the correct result:
// d1 and d2 are both of type goment.Goment d1.IsSameOrBefore(d2)
In order to fix this, I had to use this instead:
d1.IsSameOrBefore(&d1)
In the first example, false could be returned when true should be returned because of this section of code:
false
true
goment/goment.go
Line 39 in e67f454
This switch statement never checks for type Goment -- only for type *Goment. Therefore, false is returned without comparing the dates.
switch
Goment
*Goment
In addition to updating the documentation, you could have the switch statement also check for a Goment type.
The text was updated successfully, but these errors were encountered:
nleeper
Successfully merging a pull request may close this issue.
Could you please update the documentation for
IsSame()
and its similar functions?I noticed that this will not always return the correct result:
In order to fix this, I had to use this instead:
In the first example,
false
could be returned whentrue
should be returned because of this section of code:goment/goment.go
Line 39 in e67f454
This
switch
statement never checks for typeGoment
-- only for type*Goment
. Therefore,false
is returned without comparing the dates.In addition to updating the documentation, you could have the
switch
statement also check for aGoment
type.The text was updated successfully, but these errors were encountered: