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

Consider removing times from the start dates and ends dates in the Schedule JSON files #738

Open
chriswmackey opened this issue Nov 22, 2019 · 1 comment
Assignees

Comments

@chriswmackey
Copy link

From what I have been able to tell, the schedules in the standards gem ultimately map to ScheduleRulesets in the OpenStudio SDK and each of the lists of schedule values in the JSON map to ScheduleRules (correct me if I am wrong).

If this is true, then I see that the OpenStudio SDK only cares about the month and the day and not anything else related to the date like the year, hour, minute, or second. The start_date and end_date values in the Schedules JSON therefore have all of this extra info that isn't used and ends up being a bit misleading for people trying to make use of the data in the JSONS:
image
I realize that this isn't really a bug but it seems like something that could be addressed relatively easily in the way the schedule JSONS are exported from the google sheets and this would go a long way to making the logic of the JSONs more understandable for those people making use of them.

@mdahlhausen
Copy link
Collaborator

mdahlhausen commented Nov 25, 2019

I agree that the hour/minute/seconds are not necessary here.

This is an artifact of using DateTime.parse instead of Date.parse in Ruby.

      start_date = DateTime.parse(rule['start_date'])
      end_date = DateTime.parse(rule['end_date'])

It seems that Date.parse would work just as well here since we are only using the month/day/year. @asparke2 is there any reason to keep the hour:minute:second values in the .json files? They aren't in the spreadsheet.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants