summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-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 {