Skip to content

TimeBucketAction isFloorable restriction #1

@tonypizzicato

Description

@tonypizzicato

Hi! I've stuck with the problem trying to implement custom granularities in my pivot-based app.
I want to add an input to set custom time periods, e.g. P15D, P3W and so on.

But i've found that TimeBucketAction has a condition in it's constructor duration.isFloorable() that depends on siblings field for different shifter (60 for seconds and minutes, 24 for hours, 12 for month and so on), but days and weeks have no siblings at all, so i can't set any value for days other than 1.

So, I have two questions:

  1. Why is there such a restriction and why i can's set values for days other then 1(first thought that there can be different number of days in a year)?
  2. Is there some solution to set custom time periods?

Thank you!

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions