func()

in lib/time.go [156:185]


func (timeLib) ProgramOptions() []cel.ProgramOption {
	return []cel.ProgramOption{
		cel.Globals(map[string]interface{}{
			"now": func() interface{} { return time.Now().In(time.UTC) },
			"time_layout": map[string]string{
				"Layout":      time.Layout,
				"ANSIC":       time.ANSIC,
				"UnixDate":    time.UnixDate,
				"RubyDate":    time.RubyDate,
				"RFC822":      time.RFC822,
				"RFC822Z":     time.RFC822Z,
				"RFC850":      time.RFC850,
				"RFC1123":     time.RFC1123,
				"RFC1123Z":    time.RFC1123Z,
				"RFC3339":     time.RFC3339,
				"RFC3339Nano": time.RFC3339Nano,
				"Kitchen":     time.Kitchen,
				"Stamp":       time.Stamp,
				"StampMilli":  time.StampMilli,
				"StampMicro":  time.StampMicro,
				"StampNano":   time.StampNano,
				"HTTP":        http.TimeFormat,
				// TODO: Use the constants from time when go1.19 support is dropped.
				"DateTime": "2006-01-02 15:04:05", // time.DateTime from future
				"DateOnly": "2006-01-02",          // time.DateOnly from future
				"TimeOnly": "15:04:05",            // time.TimeOnly from future
			},
		}),
	}
}