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

Sort output by least difference #17

Closed
ibLeDy opened this issue May 16, 2021 · 4 comments · Fixed by #30
Closed

Sort output by least difference #17

ibLeDy opened this issue May 16, 2021 · 4 comments · Fixed by #30
Assignees
Labels
enhancement New feature or request hacktoberfest Hacktoberfest 2021
Milestone

Comments

@ibLeDy
Copy link
Owner

ibLeDy commented May 16, 2021

When the user inputs multiple timezones, we could sort the output so after the local timezone there's always the one that has the least difference.

  • We should try to preserve the user order, so if there's no difference we use the input order.

  • We may also add an argument to preserve the user order even if the sorted output would be different. Maybe we can use--preserve-order or --no-sort? Or maybe even have this feature as an opt-in via --order

For example, in the following screenshot, new_york has less difference than tijuana, so the sorted output would be:

  1. local
  2. new_york
  3. tijuana

screenshot

@ibLeDy ibLeDy added the enhancement New feature or request label May 16, 2021
@ibLeDy ibLeDy added this to the v1.0.0 milestone May 16, 2021
@ibLeDy ibLeDy added this to To do in Timezone Converter via automation May 16, 2021
@ibLeDy ibLeDy added the hacktoberfest Hacktoberfest 2021 label Sep 25, 2021
@ibLeDy ibLeDy pinned this issue Oct 2, 2021
@sibidass
Copy link

@ibLeDy as part of Hacktoberfest, shall I add this feature?

@sibidass
Copy link

it makes sense to add this as an opt-in feature (--order)

@sibidass sibidass mentioned this issue Oct 11, 2021
@ibLeDy
Copy link
Owner Author

ibLeDy commented Oct 12, 2021

sure, all yours @sibidass!

@ibLeDy
Copy link
Owner Author

ibLeDy commented Oct 12, 2021

it makes sense to add this as an opt-in feature (--order)

Yeah, I think so

Timezone Converter automation moved this from To do to Done Oct 13, 2021
@ibLeDy ibLeDy unpinned this issue Oct 10, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement New feature or request hacktoberfest Hacktoberfest 2021
Projects
Development

Successfully merging a pull request may close this issue.

2 participants