1
0
mirror of https://github.com/kataras/iris.git synced 2026-01-06 03:27:27 +00:00
This commit is contained in:
Gerasimos (Makis) Maropoulos
2023-02-19 21:44:37 +02:00
parent 84a1e97a01
commit 5095d862d9
41 changed files with 426 additions and 657 deletions

View File

@@ -135,6 +135,15 @@ func (t ISO8601) String() string {
return tt.Format(ISO8601Layout)
}
// ToSimpleDate converts the current ISO8601 "t" to SimpleDate in specific location.
func (t ISO8601) ToSimpleDate(in *time.Location) SimpleDate {
if in == nil {
in = time.UTC
}
return SimpleDateFromTime(t.ToTime().In(in))
}
// Value returns the database value of time.Time.
func (t ISO8601) Value() (driver.Value, error) {
return time.Time(t), nil