Format implements the NodeFormatter interface.
(ctx *FmtCtx)
| 1995 | |
| 1996 | // Format implements the NodeFormatter interface. |
| 1997 | func (d *DTime) Format(ctx *FmtCtx) { |
| 1998 | f := ctx.flags |
| 1999 | bareStrings := f.HasFlags(FmtFlags(lex.EncBareStrings)) |
| 2000 | if !bareStrings { |
| 2001 | ctx.WriteByte('\'') |
| 2002 | } |
| 2003 | ctx.WriteString(timeofday.TimeOfDay(*d).String()) |
| 2004 | if !bareStrings { |
| 2005 | ctx.WriteByte('\'') |
| 2006 | } |
| 2007 | } |
| 2008 | |
| 2009 | // Size implements the Datum interface. |
| 2010 | func (d *DTime) Size() uintptr { |