ParseDDate parses and returns the *DDate Datum value represented by the provided string in the provided location, or an error if parsing is unsuccessful. The dependsOnContext return value indicates if we had to consult the ParseContext (either for the time or the local timezone).
(ctx ParseContext, s string)
| 2133 | // The dependsOnContext return value indicates if we had to consult the |
| 2134 | // ParseContext (either for the time or the local timezone). |
| 2135 | func ParseDDate(ctx ParseContext, s string) (_ *DDate, dependsOnContext bool, _ error) { |
| 2136 | now := relativeParseTime(ctx) |
| 2137 | t, dependsOnContext, err := pgdate.ParseDate(now, dateStyle(ctx), s, dateParseHelper(ctx)) |
| 2138 | return NewDDate(t), dependsOnContext, err |
| 2139 | } |
| 2140 | |
| 2141 | // AsDDate attempts to retrieve a DDate from an Expr, returning a DDate and |
| 2142 | // a flag signifying whether the assertion was successful. The function should |
no test coverage detected
searching dependent graphs…