func (d Date) Equal(d2 Date) bool {
	return time.Time(d).Equal(time.Time(d2))
}
Equal checks if two Date instances are equal
package strfmt
import (
	"database/sql/driver"
	"encoding/json"
	"errors"
	"fmt"
	"time"
	"go.mongodb.org/mongo-driver/bson"
)
func init() {
	d := Date{}
	Default.Add("date", &d, IsDate)
}
func IsDate(str string) bool {
	_, err := time.Parse(RFC3339FullDate, str)
	return err == nil
}
const (
	RFC3339FullDate = "2006-01-02"
)
type Date time.Time
func (d Date) String() string {
	return time.Time(d).Format(RFC3339FullDate)
}
func (d *Date) UnmarshalText(text []byte) error {
	if len(text) == 0 {
		return nil
	}
	dd, err := time.Parse(RFC3339FullDate, string(text))
	if err != nil {
		return err
	}
	*d = Date(dd)
	return nil
}
func (d Date) MarshalText() ([]byte, error) {
	return []byte(d.String()), nil
}
func (d *Date) Scan(raw interface{}) error {
	switch v := raw.(type) {
	case []byte:
		return d.UnmarshalText(v)
	case string:
		return d.UnmarshalText([]byte(v))
	case time.Time:
		*d = Date(v)
		return nil
	case nil:
		*d = Date{}
		return nil
	default:
		return fmt.Errorf("cannot sql.Scan() strfmt.Date from: %#v", v)
	}
}
func (d Date) Value() (driver.Value, error) {
	return driver.Value(d.String()), nil
}
func (d Date) MarshalJSON() ([]byte, error) {
	return json.Marshal(time.Time(d).Format(RFC3339FullDate))
}
func (d *Date) UnmarshalJSON(data []byte) error {
	if string(data) == jsonNull {
		return nil
	}
	var strdate string
	if err := json.Unmarshal(data, &strdate); err != nil {
		return err
	}
	tt, err := time.Parse(RFC3339FullDate, strdate)
	if err != nil {
		return err
	}
	*d = Date(tt)
	return nil
}
func (d Date) MarshalBSON() ([]byte, error) {
	return bson.Marshal(bson.M{"data": d.String()})
}
func (d *Date) UnmarshalBSON(data []byte) error {
	var m bson.M
	if err := bson.Unmarshal(data, &m); err != nil {
		return err
	}
	if data, ok := m["data"].(string); ok {
		rd, err := time.Parse(RFC3339FullDate, data)
		if err != nil {
			return err
		}
		*d = Date(rd)
		return nil
	}
	return errors.New("couldn't unmarshal bson bytes value as Date")
}
func (d *Date) DeepCopyInto(out *Date) {
	*out = *d
}
func (d *Date) DeepCopy() *Date {
	if d == nil {
		return nil
	}
	out := new(Date)
	d.DeepCopyInto(out)
	return out
}
func (d Date) GobEncode() ([]byte, error) {
	return d.MarshalBinary()
}
func (d *Date) GobDecode(data []byte) error {
	return d.UnmarshalBinary(data)
}
func (d Date) MarshalBinary() ([]byte, error) {
	return time.Time(d).MarshalBinary()
}
func (d *Date) UnmarshalBinary(data []byte) error {
	var original time.Time
	err := original.UnmarshalBinary(data)
	if err != nil {
		return err
	}
	*d = Date(original)
	return nil
}