minute.go 357 B

123456789101112131415161718192021
  1. package tfelem
  2. import (
  3. "git.swzry.com/zry/YAGTF/yagtf/utils"
  4. "time"
  5. )
  6. type MinuteElement struct {
  7. }
  8. func (this *MinuteElement) ExpectedSize() int {
  9. return 2
  10. }
  11. func (this *MinuteElement) PrintElement(t time.Time) string {
  12. return utils.GetFilledNumberWithTruncate(t.Minute(), 2)
  13. }
  14. func NewMinuteElement() *MinuteElement {
  15. return &MinuteElement{}
  16. }