summaryrefslogtreecommitdiff
path: root/time.go
diff options
context:
space:
mode:
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
+}