diff --git a/pkg/utils/date/compare.go b/pkg/utils/date/compare.go new file mode 100644 index 0000000..b6a901e --- /dev/null +++ b/pkg/utils/date/compare.go @@ -0,0 +1,9 @@ +package dateutils + +import "time" + +func DateEqual(date1, date2 time.Time) bool { + y1, m1, d1 := date1.Date() + y2, m2, d2 := date2.Date() + return y1 == y2 && m1 == m2 && d1 == d2 +}