diff options
Diffstat (limited to 'time.go')
| -rw-r--r-- | time.go | 12 |
1 files changed, 6 insertions, 6 deletions
@@ -9,23 +9,23 @@ import ( ) // you will be happier if you just use this everywhere -// This is always 22 chars +// This is always 28 chars wide. It's what cobol would want. func Time(someTimeAgoOrLaterNotsure any) string { guess, t, err := TimeCheck(someTimeAgoOrLaterNotsure) // this should probably be done first if t != nil { - return FormatTime(*t) + return fmt.Sprintf("%-28.28s", FormatTime(*t)) } if len(guess) > 0 { - return fmt.Sprintf("%-22.22s", guess) + return fmt.Sprintf("%-28.28s", guess) } if errors.Is(err, Broken) { - return fmt.Sprintf("%-22.22s", "cobol.Time() Broken") + return fmt.Sprintf("%-28.28s", "cobol.Time() Broken") } if errors.Is(err, NoTime) { - return fmt.Sprintf("%-22.22s", "cobol.Time() NoTime") + return fmt.Sprintf("%-28.28s", "cobol.Time() NoTime") } - return fmt.Sprintf("%-22.22s", " / / : : (notsure)") + return fmt.Sprintf("%-28.28s", " / / : : (notsure)") } func isUTC(t time.Time) bool { |
