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

Fix date parsing for Temp Basals using ISO8601DateFormatter #350

Merged
merged 3 commits into from
Jan 1, 2025

Conversation

bjorkert
Copy link
Contributor

@bjorkert bjorkert commented Jan 1, 2025

Updated date parsing for basals using a new helper function supporting both Trio and Loop date formats.

@bjorkert bjorkert requested a review from marionbarker January 1, 2025 15:44
Copy link
Collaborator

@marionbarker marionbarker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

  1. Code review

    • looks good
    • reviewed again after second commit
  2. Test

    • tested with a site that would not display basals; with this fix, the basals are displayed properly
    • first commit failed with PR for a Loop URL; after adding second commit succeeds with Loop URL
    • success for Trio URL for 0.2.2 and 0.3.0

@marionbarker
Copy link
Collaborator

Test again after additional update that cleans up code even more. This was triggered by noticing a print statement from LoopFollow/Controllers/Nightscout/Treatments/Carbs.swift. @bjorkert then moved "the code from the new function to the global one (NightscoutUtils.parseDate)". This is a better implementation that improves date parsing for carbs as well as basal. (Other treatments already use this function).

  1. Code review (over all commits): approved
  2. Tests successful for
    • URL that had initial problem displaying basals
    • Loop URL
    • Trio 0.2.2 and 0.3.0 URLs

@marionbarker marionbarker merged commit d676af5 into dev Jan 1, 2025
@bjorkert bjorkert deleted the basal-rewrite branch January 2, 2025 13:38
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants