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

Function Time

ast/ast.go:324–326  ·  view source on GitHub ↗

Time constructs a time instant constant from nanoseconds since Unix epoch (1970-01-01 00:00:00 UTC). The valid range is approximately 1678 to 2262 CE.

(nanos int64)

Source from the content-addressed store, hash-verified

322// Time constructs a time instant constant from nanoseconds since Unix epoch (1970-01-01 00:00:00 UTC).
323// The valid range is approximately 1678 to 2262 CE.
324func Time(nanos int64) Constant {
325 return Constant{TimeType, "", nanos, nil, nil}
326}
327
328// Duration constructs a duration constant from nanoseconds.
329// Positive values represent forward durations, negative values represent backward durations.

Callers 15

bindIntervalVariablesMethod · 0.92
TestTimeLessThanFunction · 0.92
TestTimeLessThanOrEqualFunction · 0.92
TestTimeGreaterThanFunction · 0.92
TestTimeComparisonErrorFunction · 0.92
TestTimeAddFunction · 0.92
TestTimeSubFunction · 0.92
TestTimeFormatFunction · 0.92
TestTimeFormatCivilFunction · 0.92

Calls

no outgoing calls

Tested by 15

TestTimeLessThanFunction · 0.74
TestTimeLessThanOrEqualFunction · 0.74
TestTimeGreaterThanFunction · 0.74
TestTimeComparisonErrorFunction · 0.74
TestTimeAddFunction · 0.74
TestTimeSubFunction · 0.74
TestTimeFormatFunction · 0.74
TestTimeFormatCivilFunction · 0.74
TestTimeFormatInvalidFunction · 0.74
TestTimeParseFunction · 0.74