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

Allow more flexibility in start and end datetimes for az_hourly() #44

Closed
Aariq opened this issue Jul 12, 2023 · 3 comments · Fixed by #62
Closed

Allow more flexibility in start and end datetimes for az_hourly() #44

Aariq opened this issue Jul 12, 2023 · 3 comments · Fixed by #62
Assignees
Labels
enhancement New feature or request

Comments

@Aariq
Copy link
Member

Aariq commented Jul 12, 2023

The following inputs currently error, but it would be cool if they worked in some way:

library(azmetr)
az_hourly(start_date_time = "2023-07-11")
#> Error: `start_date` failed to parse
az_hourly(start_date_time = as.POSIXct("2023-07-11"))
#> Error: `start_date` failed to parse
az_hourly(start_date_time = as.Date("2023-07-11"))
#> Error: `start_date` failed to parse

Created on 2023-07-12 with reprex v2.0.2

If these arguments could accept any level of precision (e.g. by rounding down) then it might be good to deprecate start_date_time and end_date_time (and the equivalents in az_daily()) and replace with just start and end

@Aariq Aariq added the enhancement New feature or request label Jul 12, 2023
@Aariq
Copy link
Member Author

Aariq commented Jul 27, 2023

Check if vignette can be simplified if and when this change is made

@Aariq
Copy link
Member Author

Aariq commented Oct 20, 2023

@jeremylweiss if you could run az_hourly(start = "2023-10-01", end = "2023-10-02") what would you expect to get?

A) 24 readings, one for every hour on the 1st from 01:00:00 to 23:59:59 (ending just before the 2nd)
B) 48 readings going through the end of the 2nd (last data point on 2023-10-02 23:59:59)
C) Something else?

@jeremylweiss
Copy link
Member

Friday quiz! I choose 'B'. With the added detail that what comes back has a first data point of 2023-10-01 01:00:00

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants