diff options
| author | Jeff Carr <[email protected]> | 2025-10-12 03:32:26 -0500 |
|---|---|---|
| committer | Jeff Carr <[email protected]> | 2025-10-12 03:32:26 -0500 |
| commit | aff745937b2c936f87cc48b82d0725f662bb1e30 (patch) | |
| tree | 374d37a352bb7e90f515db79bf7b41ea316c582b /time.notes.go | |
| parent | a32b88646c02fd785687cd2a498b56410e62b2cd (diff) | |
Standard Time(). Perfect place for this. I am pleased.
Diffstat (limited to 'time.notes.go')
| -rw-r--r-- | time.notes.go | 55 |
1 files changed, 55 insertions, 0 deletions
diff --git a/time.notes.go b/time.notes.go new file mode 100644 index 0000000..9ead496 --- /dev/null +++ b/time.notes.go @@ -0,0 +1,55 @@ +package cobol + +/* + 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) +*/ + +/* from godoc +const ( + Layout = "01/02 03:04:05PM '06 -0700" // The reference time, in numerical order. + ANSIC = "Mon Jan _2 15:04:05 2006" + UnixDate = "Mon Jan _2 15:04:05 MST 2006" + RubyDate = "Mon Jan 02 15:04:05 -0700 2006" + RFC822 = "02 Jan 06 15:04 MST" + RFC822Z = "02 Jan 06 15:04 -0700" // RFC822 with numeric zone + RFC850 = "Monday, 02-Jan-06 15:04:05 MST" + RFC1123 = "Mon, 02 Jan 2006 15:04:05 MST" + RFC1123Z = "Mon, 02 Jan 2006 15:04:05 -0700" // RFC1123 with numeric zone + RFC3339 = "2006-01-02T15:04:05Z07:00" + RFC3339Nano = "2006-01-02T15:04:05.999999999Z07:00" + Kitchen = "3:04PM" + // Handy time stamps. + Stamp = "Jan _2 15:04:05" + StampMilli = "Jan _2 15:04:05.000" + StampMicro = "Jan _2 15:04:05.000000" + StampNano = "Jan _2 15:04:05.000000000" + DateTime = "2006-01-02 15:04:05" + DateOnly = "2006-01-02" + TimeOnly = "15:04:05" +) +*/ + +/* + // sample dates for reference + // whois: 1994-07-28T04:00:00Z + // git am: Date: Sat, 11 Oct 2025 08:54:40 -0500 + // 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 + // syslog: [Fri Oct 3 05:13:40 2025] systemd[1]: Detected architecture x86-64. + + ctimef := func(p *forgepb.Set) string { + ctime := p.Ctime.AsTime() + return ctime.Format("2006/01/02 15:04") + } +} +*/ |
