ParseDateTime creates a new DateTime from the provided value (could be [cast.ToTime] supported string, [time.Time], etc.).
(value any)
| 19 | // ParseDateTime creates a new DateTime from the provided value |
| 20 | // (could be [cast.ToTime] supported string, [time.Time], etc.). |
| 21 | func ParseDateTime(value any) (DateTime, error) { |
| 22 | d := DateTime{} |
| 23 | err := d.Scan(value) |
| 24 | return d, err |
| 25 | } |
| 26 | |
| 27 | // DateTime represents a [time.Time] instance in UTC that is wrapped |
| 28 | // and serialized using the app default date layout. |
searching dependent graphs…