FormatDate writes d into ctx according to the format flags.
(d pgdate.Date, ctx *FmtCtx)
| 2254 | |
| 2255 | // FormatDate writes d into ctx according to the format flags. |
| 2256 | func FormatDate(d pgdate.Date, ctx *FmtCtx) { |
| 2257 | f := ctx.flags |
| 2258 | bareStrings := f.HasFlags(FmtFlags(lexbase.EncBareStrings)) |
| 2259 | if !bareStrings { |
| 2260 | ctx.WriteByte('\'') |
| 2261 | } |
| 2262 | d.Format(&ctx.Buffer) |
| 2263 | if !bareStrings { |
| 2264 | ctx.WriteByte('\'') |
| 2265 | } |
| 2266 | } |
| 2267 | |
| 2268 | // Format implements the NodeFormatter interface. |
| 2269 | func (d *DDate) Format(ctx *FmtCtx) { |