Skip to content

Conversation

@greinard
Copy link
Collaborator

Overview

This branch updates the formatMinutesForLocale helper function to correct a rounding error.

Previously, the minutes were being rounded after the hours had already been determined. This meant that a value of 119.5 minutes would format as 1hr 60m.

The fix here is to round the total minutes up front, then determine the hour and minute values to use in the formatted string.

Security

  • I have ensured no secure credentials or sensitive information remain in code, metadata, comments, etc.
    • Please verify that you double checked that .storybook/preview.js does not contain your participant access key details.
    • There are no temporary testing changes committed such as API base URLs, access tokens, print/log statements, etc.
  • These changes do not introduce any security risks, or any such risks have been properly mitigated.

No new security risk. Just adjusting the minutes display format computation to handle an edge case.

Testing

This change can be adequately tested using the updated unit tests.

Documentation

  • I have added relevant Storybook updates to this PR.
  • If this feature requires a developer doc update, I have tagged @CareEvolution/api-docs.
  • This change does not impact documentation or Storybook.

@aws-amplify-us-east-1
Copy link

This pull request is automatically being deployed by Amplify Hosting (learn more).

Access this pull request here: https://pr-552.d1xp2kmk6zrv44.amplifyapp.com

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.

1 participant