summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-15 02:48:11 -0500
committerJeff Carr <[email protected]>2025-10-15 02:48:11 -0500
commitc81936f59c8d242397f20b16c745e8e8c6ea4439 (patch)
treeca8736db8703c8083183635d129c907c29e1f695
parent2b2943425d69b2dfdb8c1f7af4a6fd2707328918 (diff)
was wrong. was 28 chars
-rw-r--r--time.go12
1 files changed, 6 insertions, 6 deletions
diff --git a/time.go b/time.go
index fb2eeb7..17f4fb5 100644
--- a/time.go
+++ b/time.go
@@ -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 {