package tfelem import ( "time" ) type AMPMElement struct { } func (this *AMPMElement) ExpectedSize() int { return 2 } func (this AMPMElement) PrintElement(t time.Time) string { h := t.Hour() if h > 12 { return "PM" } else { return "AM" } } func NewAMPMElement() *AMPMElement { return &MElement{} }