summaryrefslogtreecommitdiff
path: root/time.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-11 08:54:53 -0500
committerJeff Carr <[email protected]>2025-10-11 09:26:56 -0500
commit63e3a8382583af1d96da91295616df66fcf25dc4 (patch)
tree97dd44114a87cb71a8e0dff51f0187affba18bd4 /time.go
parent300d69a300c2b4eaaab9dab4640ca1c9aeeac2f5 (diff)
a good day. finally the right place to put all this
Diffstat (limited to 'time.go')
-rw-r--r--time.go39
1 files changed, 39 insertions, 0 deletions
diff --git a/time.go b/time.go
new file mode 100644
index 0000000..68ce878
--- /dev/null
+++ b/time.go
@@ -0,0 +1,39 @@
+package cobol
+
+import "time"
+
+/*
+ etimef := func(e *forgepb.Set) string {
+ etime := e.Etime.AsTime()
+ s := etime.Format("2006/01/02 15:04")
+ if strings.HasPrefix(s, "1970/") {
+ // just show a blank if it's not set
+ return ""
+ }
+ return s
+ }
+ t.AddStringFunc("etime", etimef)
+*/
+
+/*
+ // sample dates for reference
+ // whois: 1994-07-28T04:00:00Z
+ // git am:
+ // linux date: Sat Oct 11 08:26:27 CDT 2025
+ // /bin/ls: drwxr-xr-x 2 root root 4096 Aug 15 05:31 riscv
+ // ping: 64 bytes from 2604:bbc0::1: icmp_seq=1 ttl=50 time=30.4 ms
+
+ ctimef := func(p *forgepb.Set) string {
+ ctime := p.Ctime.AsTime()
+ return ctime.Format("2006/01/02 15:04")
+ }
+}
+*/
+
+func Time(someTime any) string {
+ return "todo"
+}
+
+func GetTime(someTime any) (time.Time, error) {
+ return time.Now(), NoTime
+}