Some clean-up in criteria package
This commit is contained in:
@@ -4,6 +4,7 @@ import (
|
||||
"encoding/json"
|
||||
"fmt"
|
||||
"strings"
|
||||
"time"
|
||||
)
|
||||
|
||||
type unmarshalConjunctionType []Expression
|
||||
@@ -115,3 +116,10 @@ func marshalConjunction(name string, conj []Expression) ([]byte, error) {
|
||||
}
|
||||
return json.Marshal(aux)
|
||||
}
|
||||
|
||||
type date time.Time
|
||||
|
||||
func (t date) MarshalJSON() ([]byte, error) {
|
||||
stamp := fmt.Sprintf(`"%s"`, time.Time(t).Format("2006-01-02"))
|
||||
return []byte(stamp), nil
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user