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

Version comparison #6

Open
ErdaradunGaztea opened this issue Apr 13, 2022 · 0 comments
Open

Version comparison #6

ErdaradunGaztea opened this issue Apr 13, 2022 · 0 comments
Labels
enhancement New feature or request

Comments

@ErdaradunGaztea
Copy link
Collaborator

Use case

Comparing two version codes:

code_1 <- "1.5.10-11b"
code_2 <- "1.5.1"
ver_older_than(code_1, code_2)
# FALSE
ver_later_than(code_1, code_2)
# TRUE

Proposed name

Preferably something with older and later to be consistent with ver_oldest() and ver_latest(). A ver_ prefix would also be preferred. On the other hand, the names should not be too similar to the aforementioned functions. ver_is_older() would work well, but is_ prefix is usually connected with single argument check.
Thus, the current best is ver_older_than(). An alternative would be to have ver_compare() that returns -1, 0 and 1, but I don't like the low-level feel of this; in any case I'd want functions that return a boolean too.

@ErdaradunGaztea ErdaradunGaztea added the enhancement New feature or request label Apr 16, 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
Projects
None yet
Development

No branches or pull requests

1 participant