Documentation
¶
Overview ¶
Package strftime formats lys-shell's strftime-style format strings. The clock and other time-bearing modules take user formats in strftime syntax; Go layouts are never user-facing.
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Layout ¶
type Layout struct {
// contains filtered or unexported fields
}
Layout is a compiled strftime format: validated once at load, then formatted per tick without re-parsing.
func Compile ¶
Compile validates a strftime format. Unsupported or dangling specifiers are errors — a bad format fails at load instead of rendering garbage at runtime.
func (*Layout) Format ¶
Format renders t through the compiled format. Literal text passes through unchanged; "%%" renders a single percent sign. A chrono padding flag between the percent and the specifier re-pads numeric fields: "-" drops the padding (%-d is "5"), "_" pads with spaces, "0" with zeros; on text fields the flag changes nothing, as in chrono.