Skip to content

Commit

Permalink
Merge branch 'v2'
Browse files Browse the repository at this point in the history
  • Loading branch information
gouguoyin committed Apr 19, 2022
2 parents deec0d8 + 6c28604 commit 2672f7a
Showing 1 changed file with 3 additions and 3 deletions.
6 changes: 3 additions & 3 deletions comparer.go
Original file line number Diff line number Diff line change
Expand Up @@ -264,7 +264,7 @@ func (c Carbon) IsYesterday() bool {
if c.IsInvalid() {
return false
}
return c.ToDateString() == Now().SubDay().ToDateString()
return c.ToDateString() == Yesterday().ToDateString()
}

// IsToday reports whether is today.
Expand All @@ -273,7 +273,7 @@ func (c Carbon) IsToday() bool {
if c.IsInvalid() {
return false
}
return c.ToDateString() == c.Now().ToDateString()
return c.ToDateString() == Now().ToDateString()
}

// IsTomorrow reports whether is tomorrow.
Expand All @@ -282,7 +282,7 @@ func (c Carbon) IsTomorrow() bool {
if c.IsInvalid() {
return false
}
return c.ToDateString() == Now().AddDay().ToDateString()
return c.ToDateString() == Tomorrow().ToDateString()
}

// Compare compares by an operator.
Expand Down

0 comments on commit 2672f7a

Please sign in to comment.