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

Need formatRange and formatRangeToParts #136

Open
FrankYFTang opened this issue Mar 16, 2023 · 2 comments
Open

Need formatRange and formatRangeToParts #136

FrankYFTang opened this issue Mar 16, 2023 · 2 comments
Labels
design enhancement New feature or request v2

Comments

@FrankYFTang
Copy link
Collaborator

I know this proposal is already stage 3 but I think the following features should be considred, maybe for a v2 version

To support formatting range of duration by adding

  • Intl.DurationFormat.prototype.formatRange
  • Intl.DurationFormat.prototype.formatRangeToParts

Here are some real use case

  • Use Case 1
    Time to complete this task: "56 minutes to 2 hours 3 minutes" in a Project Management software

  • Use Case 2
    Estimate wait to be served "40 seconds to 10 minutes 20 seconds" in the TechSupport queue

  • Use Case 3
    Fly Status Tracking software
    "UA945 delay time in the last 3 weeks: 4 minutes to 1 hour and 18 minutes"

  • Use Case 4
    Map software for direction
    "Time to walk from San Jose to San Francisco: 4 hours and 35 minutes to 6 hours and 10 minutes"

  • Use Case 5
    Restaurant
    "Wait time for 6 people to get the seat now: 15 minutes to 2 hours and 5 minutes"

@sffc @ryzokuken Not high priority imporant feature but worth of thinking for future plan.

@ryzokuken
Copy link
Member

I was just using the UPS website this morning and thought of this! Great timing Frank. I agree that it's beyond the scope of this proposal but a good contender for DurationFormat v2. I'll post this as an issue on 402 so we can take it from there.

@FrankYFTang
Copy link
Collaborator Author

could you include some screenshot when you see one?

@ryzokuken ryzokuken added enhancement New feature or request design v2 labels Apr 6, 2023
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
design enhancement New feature or request v2
Projects
None yet
Development

No branches or pull requests

2 participants