hfaerber/Refactor-tractor-Fit-lit

Refactor how date is calculated in scripts

Closed this issue · 0 comments

Date cannot be calculated by pulling the last date from the activityData because data may be posted to hydration or sleep for a given date but not to activity. This means the methods run on the data sets can't rely on this date calculation now that we are using an api for the data set.

We should be able to change the date to the actual current date and refactor any methods that search for a week of data accordingly. This will work because the datasets in the APIs have date for many dates prior to today(ish) and many dates post today(ish) so any data being added by other student won't affect it (since that data will get tacked on the end)