Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

dateRange not working as expected for hourly frequency #572

Open
Kyervnienh opened this issue May 3, 2023 · 1 comment
Open

dateRange not working as expected for hourly frequency #572

Kyervnienh opened this issue May 3, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@Kyervnienh
Copy link

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]
@steveoni steveoni added the bug Something isn't working label Aug 7, 2023
@jackchalat
Copy link

Found a similar problem. Probably related.

dateRange({ start: "2004-07-30", end: "2023-09-29", freq: "D" });
results in

image

The dates between 2023-08-29 and 2023-09-28 are missing.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

3 participants