Be part of JetBrains PHPverse 2026 on June 9 – a free online event bringing PHP devs worldwide together.

Antonella's avatar

Metrics Range yesterday

I am defining a metric, but I cannot define the Ranges relating to yesterday, i.e. I would like to take only the values of the previous day so I take the previous one plus the current one

    public function ranges()
    {
        return [
            'TODAY' => __('Today'),
            2 => __('Yesterday'),//bad solutions
            7 => __('Week'),
            30 => __('30 Days'),
            60 => __('60 Days'),
            90 => __('90 Days'),
            365 => __('365 Days'),
        ];
    }
0 likes
0 replies

Please or to participate in this conversation.