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

Unit conversions #9

Open
mikehayesuk opened this issue Jul 11, 2016 · 4 comments
Open

Unit conversions #9

mikehayesuk opened this issue Jul 11, 2016 · 4 comments

Comments

@mikehayesuk
Copy link

mikehayesuk commented Jul 11, 2016

Hi

Thanks for a nice library. I'd like to be able to do something like this:

Binary::megabytes(15360)->as('GB'); // result = (int)15

If I gave this a go at some point would you accept a PR? Any advice on how you would prefer it to work?

Thanks,
Mike

@gabrielelana
Copy link
Owner

Sure, PRs are more than welcome and the proposed API is nice and useful so please give it a try.

Please in you PR:

  • keep the formatting style
  • unit test the whole thing
  • don't brake previous tests

I'll try to give you feedback as quickly as possibile 😄

@phansys
Copy link

phansys commented Feb 20, 2018

@mhayes14, do you plan to create a PR for this proposed feature?

@ignacio-dev
Copy link

Was this ever implemented? On the package description it states that it converts, but it only formats, compares and manipulates.

@olaulau
Copy link

olaulau commented Aug 21, 2024

+1, would be great to have unit conversion separated from the formatting !

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

No branches or pull requests

5 participants