-
Notifications
You must be signed in to change notification settings - Fork 103
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
Incorrect tablespoon conversion #35
Comments
Could you check your example? I just tried and it outputted Qty('3tbs').to('ml').toPrec('ml').toString(); // => "44 ml" There's also a typo in your example: |
There's 15mls in a tablespoon isn't there Regards Date: Thu, 19 Feb 2015 00:18:35 -0800 Could you check your example? I just tried and it outputted 44ml as expected: Qty('3tbs').to('ml').toPrec('ml').toString(); // => "44 ml" There's also a typo in your example: tb instead of tbs. — |
According to several references, there's Qty('1 tbs').to('ml').toString(); // => "14.7867648 ml"
Qty('3 tbs').to('ml').toString(); // => "44.3602944 ml" Do you have any issue when using it? Whatever it be, I've added |
Ok. --- Original Message --- From: "Julien Sanchez" [email protected] According to several references, there's Qty('1 tbs').to('ml').toString(); // => "14.7867648 ml"
Qty('3 tbs').to('ml').toString(); // => "44.3602944 ml" Do you have any issue when using it? Whatever it be, I've added Reply to this email directly or view it on GitHub: |
Ok. How can I make it round up to 45 ml? --- Original Message --- From: "Julien Sanchez" [email protected] According to several references, there's Qty('1 tbs').to('ml').toString(); // => "14.7867648 ml"
Qty('3 tbs').to('ml').toString(); // => "44.3602944 ml" Do you have any issue when using it? Whatever it be, I've added Reply to this email directly or view it on GitHub: |
Actually I added to myself which is why it was there :) --- Original Message --- From: "Julien Sanchez" [email protected] According to several references, there's Qty('1 tbs').to('ml').toString(); // => "14.7867648 ml"
Qty('3 tbs').to('ml').toString(); // => "44.3602944 ml" Do you have any issue when using it? Whatever it be, I've added Reply to this email directly or view it on GitHub: |
Currently, there's no way to redefine units. You could update the tablespoon value in your own fork here by replacing https://github.com/gentooboontoo/js-quantities/blob/master/src/quantities.js#L117 |
Great thanks --- Original Message --- From: "Julien Sanchez" [email protected] Currently, there's no way to redefine units. You could update the tablespoon value in your own fork here by replacing https://github.com/gentooboontoo/js-quantities/blob/master/src/quantities.js#L117 Reply to this email directly or view it on GitHub: |
I can give you lots of other aliases if you like. --- Original Message --- From: "Julien Sanchez" [email protected] According to several references, there's Qty('1 tbs').to('ml').toString(); // => "14.7867648 ml"
Qty('3 tbs').to('ml').toString(); // => "44.3602944 ml" Do you have any issue when using it? Whatever it be, I've added Reply to this email directly or view it on GitHub: |
Willingly. I could add any missing unit with actual use and not conflicting with existing ones. |
My complete list is attached. A lot of them won't be relevant to you as they come from recipes Regards Date: Thu, 19 Feb 2015 06:04:25 -0800 Willingly. I could add any missing unit with actual use and not conflicting with existing ones. — |
Why does this conversion output 44 g?
var qtyunit = '3 tb';
qtyunit = Qty(qtyunit);
qtyunit = qtyunit.to('ml').toPrec('ml').toString();
The text was updated successfully, but these errors were encountered: