MCPcopy Create free account
hub / github.com/cel-expr/cel-go / timestampGetFullYear

Function timestampGetFullYear

common/stdlib/standard.go:968–974  ·  view source on GitHub ↗
(ts, tz ref.Val)

Source from the content-addressed store, hash-verified

966}
967
968func timestampGetFullYear(ts, tz ref.Val) ref.Val {
969 t, err := inTimeZone(ts, tz)
970 if err != nil {
971 return types.NewErrFromString(err.Error())
972 }
973 return types.Int(t.Year())
974}
975
976func timestampGetMonth(ts, tz ref.Val) ref.Val {
977 t, err := inTimeZone(ts, tz)

Callers 1

initStandardFunction · 0.70

Calls 4

NewErrFromStringFunction · 0.92
IntTypeAlias · 0.92
inTimeZoneFunction · 0.85
ErrorMethod · 0.45

Tested by

no test coverage detected