Open davidmanzanares opened 6 years ago
I think that we could start by implementing between
for dates and implement more expressions if users request those features.
I had seconds thoughts about this now, implementing it partially could confuse users, implementing it completely is a major change and will require much time.
Let's review this issue in the context of https://github.com/CartoDB/carto-vl/issues/551.
To improve precision, all date properties are re-mapped to the [0,1] range. This makes all arithmetic operations to be unimplemented (I don't know right now if at least we are throwing a type-check error if the user tries).
The only way right now to work around this issue is to use
linear()
since it has the re-mapping logic. For example, to check that a date property is within today you'll need a hack like:between(linear($date, firstSecondOfToday, lastSecondOfToday), 0.01, 0.99)