package datatypes

import (
	
	
	
)

type Date time.Time

func ( *Date) ( interface{}) ( error) {
	 := &sql.NullTime{}
	 = .Scan()
	* = Date(.Time)
	return
}

func ( Date) () (driver.Value, error) {
	, ,  := time.Time().Date()
	return time.Date(, , , 0, 0, 0, 0, time.Time().Location()), nil
}

// GormDataType gorm common data type
func ( Date) () string {
	return "date"
}

func ( Date) () ([]byte, error) {
	return time.Time().GobEncode()
}

func ( *Date) ( []byte) error {
	return (*time.Time)().GobDecode()
}

func ( Date) () ([]byte, error) {
	return time.Time().MarshalJSON()
}

func ( *Date) ( []byte) error {
	return (*time.Time)().UnmarshalJSON()
}