MCPcopy
hub / github.com/google/mangle / NewTimestampBound

Function NewTimestampBound

ast/temporal.go:169–174  ·  view source on GitHub ↗

NewTimestampBound creates a bound from a time.Time value.

(t time.Time)

Source from the content-addressed store, hash-verified

167
168// NewTimestampBound creates a bound from a time.Time value.
169func NewTimestampBound(t time.Time) TemporalBound {
170 return TemporalBound{
171 Type: TimestampBound,
172 Timestamp: t.UnixNano(),
173 }
174}
175
176// NewDurationBound creates a bound from a time.Duration value.
177func NewDurationBound(d time.Duration) TemporalBound {

Callers 15

resolveBoundMethod · 0.92
resolveBoundWithSubstFunction · 0.92
VisitTemporalBoundMethod · 0.92
TestParseTemporalFactFunction · 0.92
TestTemporalBoundFunction · 0.85
TestTemporalBoundEqualsFunction · 0.85
TestIntervalFunction · 0.85
TestIntervalContainsFunction · 0.85

Calls

no outgoing calls

Tested by 12

TestParseTemporalFactFunction · 0.74
TestTemporalBoundFunction · 0.68
TestTemporalBoundEqualsFunction · 0.68
TestIntervalFunction · 0.68
TestIntervalContainsFunction · 0.68
TestIntervalOverlapsFunction · 0.68
TestTemporalAtomFunction · 0.68
TestTemporalOperatorFunction · 0.68