[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Taler] (docs) Amount vs ParsedAmount
From: |
Thien-Thi Nguyen |
Subject: |
[Taler] (docs) Amount vs ParsedAmount |
Date: |
Tue, 23 Mar 2021 12:44:34 -0400 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/27.1 (gnu/linux) |
I see that there are two types, ‘Amount’ and ‘ParsedAmount’,
defined in api-common.rst. There is also the blurb:
// For example, a fraction
// of 50,000,000 would correspond to 50 cents.
(in the ‘ParsedAmount’ explanation for field ‘fraction’).
My understanding is that when i write ‘Amount’ "EUR:1.50", that
corresponds to (becomes, after parsing) the ‘ParsedAmount’
object:
{
"currency": "EUR",
"value": 1,
"fraction": 50000000
}
That is, the ".50" portion of ‘Amount’ is textually "zero-
extended" to eight digits before applying some kind of ‘atol’
function.
My questions are:
(a) Is that correct?
(b) For future reference, where can i find this in the source?
(Which repo?)
--
Thien-Thi Nguyen -----------------------------------------------
(defun responsep (query) ; (2021) Software Libero
(pcase (context query) ; = Dissenso Etico
(`(technical ,ml) (correctp ml))
...)) 748E A0E8 1CB8 A748 9BFA
--------------------------------------- 6CE4 6703 2224 4C80 7502
signature.asc
Description: PGP signature
- [Taler] (docs) Amount vs ParsedAmount,
Thien-Thi Nguyen <=