Incorrect documentation or examples for `map`?
Schnouki opened this issue · 2 comments
Schnouki commented
Hi Gonçalo,
I had a look at the anatomy of rules, but I can't reconcile the documentation for map
and the examples. Is it an error in the doc, or in my brain?
To be more precise:
- example for a gradual rollout:
map(now(), datetime("2022-11-08"), datetime("2022-11-15"), 0, 1)
map
syntax:map(instart, inend, outstart, outend, value)
That would mean that in the example, instart
, inend
, and outstart
are dates, and outend
and value
are integers. That seems wrong...
So, either the example should be map(datetime("2022-11-08"), datetime("2022-11-15"), 0, 1, now())
, or the syntax should be map(value, instart, inend, outstart, outend)
.
Or am I missing something?
Schnouki commented
Looks like the syntax is correct, so it's probably the example that is wrong :)
goncalossilva commented
Good catch. I'll fix this if you don't send a PR in the meantime.