Equal reports whether the current DateTime and u represent the same time instant. Two DateTime can be equal even if they are in different locations. For example, 6:00 +0200 and 4:00 UTC are Equal.
(u DateTime)
| 79 | // Two DateTime can be equal even if they are in different locations. |
| 80 | // For example, 6:00 +0200 and 4:00 UTC are Equal. |
| 81 | func (d DateTime) Equal(u DateTime) bool { |
| 82 | return d.Time().Equal(u.Time()) |
| 83 | } |
| 84 | |
| 85 | // Unix returns the current DateTime as a Unix time, aka. |
| 86 | // the number of seconds elapsed since January 1, 1970 UTC. |