Skip to content

Commit

Permalink
🧹 chore: add function comment
Browse files Browse the repository at this point in the history
  • Loading branch information
jingyuexing committed Apr 15, 2024
1 parent c8d1e08 commit d9dedb8
Showing 1 changed file with 3 additions and 2 deletions.
5 changes: 3 additions & 2 deletions datetime.go
Original file line number Diff line number Diff line change
Expand Up @@ -346,11 +346,12 @@ func (dt DateTime) Min(date ...DateTime) DateTime {
}
return min
}

// the current time is before the specified time
func (dt DateTime) IsBefore(d DateTime) bool {
return d.Time() < dt.Time()
return d.Time() > dt.Time()
}

// the current time is after the specified time
func (dt DateTime) IsAfter(d DateTime) bool {
return dt.Time() < d.Time()
}

0 comments on commit d9dedb8

Please sign in to comment.