Adrià Vilanova MartÃnez | e73997b | 2022-07-19 18:58:55 +0200 | [diff] [blame] | 1 | package main |
2 | |||||
3 | import "time" | ||||
4 | |||||
5 | // Adapted from https://stackoverflow.com/a/21069048 | ||||
6 | func dateEqual(date1, date2 time.Time) bool { | ||||
7 | y1, m1, d1 := date1.Date() | ||||
8 | y2, m2, d2 := date2.Date() | ||||
9 | return y1 == y2 && m1 == m2 && d1 == d2 | ||||
10 | } |