src/time.bend checks
raw source on the hub · import bend-kube-runtime@0.5.5.0/src/time.bend as Time
1 import
import Base
Types
type Civil source · line 12 · raw
Data
Civil@year:U32 -> @month:U32 -> @day:U32 -> Civil
type Wall source · line 84 · raw
Data
A wall-clock reading (sys.bend's Sys.wall).
Wall@days:U32 -> @secs:U32 -> @usecs:U32 -> Wall
Definitions
def Time.civil.month.go source · line 15 · raw
@+mp:U32 -> @low:Bool -> U32
def Time.civil.month source · line 22 · raw
@+mp:U32 -> U32
def Time.civil.year.go source · line 25 · raw
@+y:U32 -> @early:Bool -> U32
def Time.civil.year source · line 32 · raw
@+y:U32 -> @+m:U32 -> U32
def Time.civil.fin source · line 35 · raw
@+y:U32 -> @+doy:U32 -> @+mp:U32 -> Civil
def Time.civil.doy source · line 39 · raw
@+y:U32 -> @+doy:U32 -> Civil
def Time.civil.yoe source · line 42 · raw
@+era:U32 -> @+doe:U32 -> @+yoe:U32 -> Civil
def Time.civil.doe source · line 45 · raw
@+era:U32 -> @+doe:U32 -> Civil
def Time.civil.era source · line 48 · raw
@+z:U32 -> Civil
def Time.civil source · line 52 · raw
@+days:U32 -> Civil
The date of a count of days since 1970-01-01.
def Time.pad.go source · line 55 · raw
@+s:String -> @width:Nat -> String
def Time.pad source · line 59 · raw
@+n:U32 -> @width:Nat -> String
n in at least width digits, zero-padded.
def Time.date source · line 62 · raw
@c:Civil -> String
def Time.clock source · line 67 · raw
@+secs:U32 -> String
def Time.stamp source · line 72 · raw
@+secs:U32 -> String
"YYYY-MM-DDTHH:MM:SS"
def Time.rfc3339 source · line 76 · raw
@+secs:U32 -> String
metav1.Time: second precision.
def Time.rfc3339_micro source · line 80 · raw
@+secs:U32 -> @+usecs:U32 -> String
metav1.MicroTime: microsecond precision.
def Wall.of source · line 87 · raw
@w:Pair(U32, Pair(U32, U32)) -> Wall
def Wall.micro source · line 93 · raw
@w:Wall -> String
"YYYY-MM-DDTHH:MM:SS.ffffffZ" (metav1.MicroTime).
def Wall.rfc3339 source · line 99 · raw
@w:Wall -> String
"YYYY-MM-DDTHH:MM:SSZ" (metav1.Time).
def Wall.ms source · line 106 · raw
@w:Wall -> U32
Milliseconds, modulo 2^32: only for differences under 49 days, which wrap correctly in U32 subtraction.
def Wall.id source · line 112 · raw
@w:Wall -> String
A decimal stamp unique to the microsecond, for names.
def Time.days.go source · line 122 · raw
@+y:U32 -> @+m:U32 -> @+d:U32 -> @+mp:U32 -> U32
Days since 1970-01-01 of a civil date (Howard Hinnant's days_from_civil), for years from 1970.
def Time.days.early source · line 126 · raw
@+y:U32 -> @+m:U32 -> @+d:U32 -> @early:Bool -> U32
def Time.days source · line 133 · raw
@+y:U32 -> @+m:U32 -> @+d:U32 -> U32
def Time.sub source · line 136 · raw
@s:String -> @i:Nat -> @n:Nat -> String
def Time.parse.go source · line 139 · raw
@y:Maybe<&2, U32> -> @mo:Maybe<&2, U32> -> @d:Maybe<&2, U32> -> @h:Maybe<&2, U32> -> @mi:Maybe<&2, U32> -> @se:Maybe<&2, U32> -> @ok:Bool -> Maybe<&2, U32>
def Time.parse.seps source · line 147 · raw
@+s:String -> Bool
def Time.parse source · line 154 · raw
@+s:String -> Maybe<&2, U32>
Seconds since the epoch of "YYYY-MM-DDTHH:MM:SS[.fff]Z" (metav1.Time and MicroTime; the fraction is dropped), or None.
def Wall.secs source · line 160 · raw
@w:Wall -> U32
Seconds since the epoch of a wall-clock reading.