MCPcopy Create free account
hub / github.com/cel-expr/cel-cpp / RegisterTimeFunctions

Function RegisterTimeFunctions

runtime/standard/time_functions.cc:484–497  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

482} // namespace
483
484absl::Status RegisterTimeFunctions(FunctionRegistry& registry,
485 const RuntimeOptions& options) {
486 CEL_RETURN_IF_ERROR(RegisterTimestampFunctions(registry, options));
487 CEL_RETURN_IF_ERROR(RegisterDurationFunctions(registry));
488
489 // Special arithmetic operators for Timestamp and Duration
490 // TODO(uncreated-issue/37): deprecate unchecked time math functions when clients no
491 // longer depend on them.
492 if (options.enable_timestamp_duration_overflow_errors) {
493 return RegisterCheckedTimeArithmeticFunctions(registry);
494 }
495
496 return RegisterUncheckedTimeArithmeticFunctions(registry);
497}
498
499} // namespace cel

Callers 3

RegisterBuiltinFunctionsFunction · 0.85
TESTFunction · 0.85

Tested by 1

TESTFunction · 0.68