Closed anguila closed 1 year ago
@dexamenos Erik,
no idea how many decimals the various APIs provide, but how about keyword currency-set-dec
(and alternatively currency-set-decimal
?) with argument 2
as "factory" default, accepting any (?) integer number (or any number between 2
and 6
). Perhaps also argument max
and/or all
for the maximum of decimals as provided by the API.
André
Keyword would be "overengineering" (and comparably loads of work) -- but making it a setting in workflow preferences would be doable.
First, I will look, what the different APIs offer.
However, I am not sure if it should offer more decimals. Isn't it like banks are also rounding while converting? @anguila ? What's the use of more digits?
Nevertheless, I'm aware of at least one currency, which uses three decimals in daily usage (OMR) and the Japanese do not use decimals at all.
No, banks do not truncate/round to decimals. Take a look for instance at your credit card billing after traveling to foreign countries: Exchange rates (I know, I know different rates than bank rates) are always shown with 5 decimals. As bigger the transaction sums are, as more important the 3rd or 4th decimal becomes. Think for instance of purchasing containers with PV modules 😉
Common FX 'finance' practice is 4.
https://www.bloomberg.com/quote/GBPEUR:CUR https://finance.yahoo.com/quote/GBPEUR=X
Especially around currencies is relevant due to its fluctuation
Keyword might be over-engineered, but then on the other hand so is currency-set-from
and currency-set-to
. It’s just convenient, as some people might need/want more than 2 decimals only occasionally.
Alright, I will look at it -- however not today, as there is bank holiday today in my area
Hello @anguila,
I have pushed a new release → v1.13.2. Alfred will look for an update of the workflow only once a day, so you can manually download the *.alfredworkflow file from the releases page and run it.
Changes: use maximum number of available significant digits from each API (note: exchangeratesapi.io and currencyconverterapi only offer four decimal places, which in worst case leads to only 1 (!!) significant digit).
There now is a new setting in Workflow Configuration, where you can choose the number of decimal places as "default" (the previous behaviour, i.e. default referring to the number of decimal places typically used for that currency – yes, this changes depending on the to-currency (e.g. Yen → 0 decimal places, Omani Rial → 3 decimal places), or any number you like from 0 through 6 decimal places.
Please let me know if this helps with your issue!
Super! Thanks!
Hi, First, thanks for sharing this with the rest of the world! That's the currency converter I was looking for.
I was wondering if there's any way to add more decimals to the conversion, and if not would you consider adding that option in future versions? While 2 decimals gives you a good idea, only 2 don't seem enough for currency conversion.
Thanks,
David