Skip to content

dateRange not working as expected for hourly frequency #572

Open
@Kyervnienh

Description

@Kyervnienh

Describe the bug
I wanna use dateRange to get an array of dates for every hour between "start" and "end", but instead i'm getting an array of date s only between the initial and final hour without considering the days/months/years between the dates.

If freq = "D" it has the expected behavior.

To Reproduce
Steps to reproduce the behavior:

  1. Go to https://codesandbox.io/s/danfo-js-sandbox-forked-1tg1km?file=/src/App.js
  2. Click on the button "test dateRange"
  3. In the console there will be three arrays, the first with one element and the second with 10, both of them with freq="H" and the wrong behavior, the third array has the correct behavior when using freq="D"

Expected behavior
When using freq="H" and providing <> and <> the output should be an array with every hour between the two dates.

Screenshots
Inputs

Outputs

Desktop (please complete the following information):

  • OS: [MacOS Ventura]
  • Browser [chrome]
  • Version [1.1.2]

Metadata

Metadata

Assignees

No one assigned

    Labels

    bugSomething isn't working

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions