turnilo
turnilo copied to clipboard
Time granularities like PT18H or P2D return not floorable
Hi,
We are trying to achieve time granularities like PT18H and P2D but time split return not floorable, is there a reason to keep this limitation or this is a bug ?
thanks
It looks like a bug, we will investigate the issue soon. Thanks!
https://github.com/implydata/plywood/blob/master/src/expressions/timeBucketExpression.ts#L47
Plywood requires Duration to be floor able to create TimeBucket. I don't think we can bypass that.
Plywood uses chronoshift to this calculation https://github.com/implydata/chronoshift/blob/master/src/duration/duration.ts#L256
Which is using criteria defined in https://github.com/implydata/chronoshift/blob/master/src/floor-shift-ceil/floor-shift-ceil.ts
So, in principle making changes in chronoshift logic should work and you will not require to bypass anything in Plywood
This library is also not in our control. Maybe we should create ticket in plywood repo? Chronoshift is also supported by them.
Let's see what happens: https://github.com/implydata/plywood/issues/180