Compare compares the current DateTime instance with u. If the current instance is before u, it returns -1. If the current instance is after u, it returns +1. If they're the same, it returns 0.
(u DateTime)
| 72 | // If the current instance is after u, it returns +1. |
| 73 | // If they're the same, it returns 0. |
| 74 | func (d DateTime) Compare(u DateTime) int { |
| 75 | return d.Time().Compare(u.Time()) |
| 76 | } |
| 77 | |
| 78 | // Equal reports whether the current DateTime and u represent the same time instant. |
| 79 | // Two DateTime can be equal even if they are in different locations. |