Comments (11)
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
.
from js-quantities.
There's 15mls in a tablespoon isn't there
Regards
Barbara
Date: Thu, 19 Feb 2015 00:18:35 -0800
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [js-quantities] Incorrect tablespoon conversion (#35)
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.
—
Reply to this email directly or view it on GitHub.
from js-quantities.
According to several references, there's 14.7867648 ml
in a tb (so approximately 44ml
for three tb):
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 tb
as tablespoon alias.
from js-quantities.
Ok.
--- Original Message ---
From: "Julien Sanchez" [email protected]
Sent: 19 February 2015 23:39
To: "gentooboontoo/js-quantities" [email protected]
Cc: "barbmc" [email protected]
Subject: Re: [js-quantities] Incorrect tablespoon conversion (#35)
According to several references, there's 14.7867648 ml
in a tb (so approximately 44ml
for three tb):
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 tb
as tablespoon alias.
Reply to this email directly or view it on GitHub:
#35 (comment)
from js-quantities.
Ok. How can I make it round up to 45 ml?
--- Original Message ---
From: "Julien Sanchez" [email protected]
Sent: 19 February 2015 23:39
To: "gentooboontoo/js-quantities" [email protected]
Cc: "barbmc" [email protected]
Subject: Re: [js-quantities] Incorrect tablespoon conversion (#35)
According to several references, there's 14.7867648 ml
in a tb (so approximately 44ml
for three tb):
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 tb
as tablespoon alias.
Reply to this email directly or view it on GitHub:
#35 (comment)
from js-quantities.
Actually I added to myself which is why it was there :)
--- Original Message ---
From: "Julien Sanchez" [email protected]
Sent: 19 February 2015 23:39
To: "gentooboontoo/js-quantities" [email protected]
Cc: "barbmc" [email protected]
Subject: Re: [js-quantities] Incorrect tablespoon conversion (#35)
According to several references, there's 14.7867648 ml
in a tb (so approximately 44ml
for three tb):
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 tb
as tablespoon alias.
Reply to this email directly or view it on GitHub:
#35 (comment)
from js-quantities.
Currently, there's no way to redefine units. You could update the tablespoon value in your own fork here by replacing 1.47867648e-5
with 1.5e-5
:
https://github.com/gentooboontoo/js-quantities/blob/master/src/quantities.js#L117
from js-quantities.
Great thanks
--- Original Message ---
From: "Julien Sanchez" [email protected]
Sent: 20 February 2015 00:03
To: "gentooboontoo/js-quantities" [email protected]
Cc: "barbmc" [email protected]
Subject: Re: [js-quantities] Incorrect tablespoon conversion (#35)
Currently, there's no way to redefine units. You could update the tablespoon value in your own fork here by replacing 1.47867648e-5
with 1.5e-5
:
https://github.com/gentooboontoo/js-quantities/blob/master/src/quantities.js#L117
Reply to this email directly or view it on GitHub:
#35 (comment)
from js-quantities.
I can give you lots of other aliases if you like.
--- Original Message ---
From: "Julien Sanchez" [email protected]
Sent: 19 February 2015 23:39
To: "gentooboontoo/js-quantities" [email protected]
Cc: "barbmc" [email protected]
Subject: Re: [js-quantities] Incorrect tablespoon conversion (#35)
According to several references, there's 14.7867648 ml
in a tb (so approximately 44ml
for three tb):
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 tb
as tablespoon alias.
Reply to this email directly or view it on GitHub:
#35 (comment)
from js-quantities.
Willingly. I could add any missing unit with actual use and not conflicting with existing ones.
from js-quantities.
My complete list is attached. A lot of them won't be relevant to you as they come from recipes
Regards
Barbara
Date: Thu, 19 Feb 2015 06:04:25 -0800
From: [email protected]
To: [email protected]
CC: [email protected]
Subject: Re: [js-quantities] Incorrect tablespoon conversion (#35)
Willingly. I could add any missing unit with actual use and not conflicting with existing ones.
—
Reply to this email directly or view it on GitHub.
from js-quantities.
Related Issues (20)
- Conversion of compound units gives wrong result
- getSystems() It would be useful to tag/group the unit names by their SI, Imperial or other system and allow conversion toSystem('imperial')
- Possibility to add a method qty.getUnit() ? HOT 1
- Dividing by temperatures HOT 1
- Dividing by temperature HOT 1
- add metric ton symbol "t" HOT 1
- surfaces (m², km², hectares) HOT 1
- compatibility with Unified Code for Units of Measure HOT 1
- Translation of units into different languages
- no power operators? HOT 1
- Human readable value in contrained range HOT 2
- js-quantities is incompatible with sugarjs and prototypejs
- Lacking precision necessary for required comparisons HOT 10
- No converter for Miliradians
- Swift Converter error: Incompatible units
- Values formatted with group separators do not parse
- Pretty unit output
- Publish new version to npm HOT 1
- Can't import the ES module in Angular HOT 4
- Rounding Issues when converting Millimeter to Centimeter HOT 3
Recommend Projects
-
React
A declarative, efficient, and flexible JavaScript library for building user interfaces.
-
Vue.js
🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.
-
Typescript
TypeScript is a superset of JavaScript that compiles to clean JavaScript output.
-
TensorFlow
An Open Source Machine Learning Framework for Everyone
-
Django
The Web framework for perfectionists with deadlines.
-
Laravel
A PHP framework for web artisans
-
D3
Bring data to life with SVG, Canvas and HTML. 📊📈🎉
-
Recommend Topics
-
javascript
JavaScript (JS) is a lightweight interpreted programming language with first-class functions.
-
web
Some thing interesting about web. New door for the world.
-
server
A server is a program made to process requests and deliver data to clients.
-
Machine learning
Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.
-
Visualization
Some thing interesting about visualization, use data art
-
Game
Some thing interesting about game, make everyone happy.
Recommend Org
-
Facebook
We are working to build community through open source technology. NB: members must have two-factor auth.
-
Microsoft
Open source projects and samples from Microsoft.
-
Google
Google ❤️ Open Source for everyone.
-
Alibaba
Alibaba Open Source for everyone
-
D3
Data-Driven Documents codes.
-
Tencent
China tencent open source team.
from js-quantities.