summaryrefslogtreecommitdiff
path: root/time.go
diff options
context:
space:
mode:
authorJeff Carr <[email protected]>2025-10-11 09:25:56 -0500
committerJeff Carr <[email protected]>2025-10-11 09:50:17 -0500
commita32b88646c02fd785687cd2a498b56410e62b2cd (patch)
tree528d711fd27831613df1e5e979e653df5ee6ed15 /time.go
parent63e3a8382583af1d96da91295616df66fcf25dc4 (diff)
pretty good 5 char duration.v0.0.18
Diffstat (limited to 'time.go')
-rw-r--r--time.go28
1 files changed, 27 insertions, 1 deletions
diff --git a/time.go b/time.go
index 68ce878..df8ed63 100644
--- a/time.go
+++ b/time.go
@@ -15,13 +15,39 @@ import "time"
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:
+ // 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()