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

Editorial: PartitionDurationFormatPattern accessing non-existent slots #191

Closed
wants to merge 1 commit into from

Conversation

ben-allen
Copy link
Collaborator

@ben-allen ben-allen commented Apr 11, 2024

fix #190: PartitionDurationFormatPattern incorrectly tried to draw value of hours and seconds from DurationFormat object rather than from Duration Record.

Copy link
Collaborator

@FrankYFTang FrankYFTang left a comment

Choose a reason for hiding this comment

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

LGTM

@FrankYFTang
Copy link
Collaborator

This PR will solve the accessing non-existent slots issue. However, it is not solving the output problem completely.
Consider the following input

{"hours":1,"minutes":0,"seconds":0,"milliseconds":1}
{"hours":1,"minutes":0,"seconds":0,"microseconds":1}
{"hours":1,"minutes":0,"seconds":0,"nanoseconds":1}

The output in the algorithm will not set displayRequired to true because duration.[[Seconds]] is 0.

…ue of hours and seconds from DurationFormat object rather than from Duration Record
@ben-allen
Copy link
Collaborator Author

marking this one as closed, since #188 fixed both:

  • the invalid slot access issue
  • the issue with seconds being marked as not formatted when seconds is 0 but there exists a subsecond unit with a nonzero value.

@ben-allen ben-allen closed this May 21, 2024
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.

Incorrect access of [[HoursValue]] and [[SecondsValue]] of durationFormat in PartitionDurationFormatPattern
2 participants