You are looking at historical revision 13621 of this page. It may differ significantly from its current revision.
Perform currency convertion, using data from the XML feeds of the European Central Bank.
==Version 1.0.0 (initial release)
'''Procedure:''' (currency-convert FROM TO AMOUNT [#:table TABLE] [#:format? FORMAT?])
FROM and TO are symbols, AMOUNT is either a string or a number. TABLE is an alternate conversion to use, an alist of (SYMBOL . EURO-VALUE) FORMAT?, if #f, will not format the result as money (and thus return a string)
When #f (the default) the XML is retrieved and parsed from the bank at every call to currenncy-convert. When set, it's value is used as the conversion table.
Retrieve and parse current values from the bank and set currency-converter-table.
|CNY||Chinese yuan renminbi|
|HKD||Hong Kong dollar|
|KRW||South Korean won|
|NZD||New Zealand dollar|
|RON||New Romanian leu|
|TRY||New Turkish lira|
|ZAR||South African rand|
(currency-convert 'USD 'EUR 45.34) => "32.03" (currency-convert 'USD 'EUR 45.34 #:format? #f) => 32.3003490774382 (currency-convert 'USD 'EUR 45.34 #:table '((EUR . 1)(USD . 34))) => "1.33"
|Copyright 2007 Jean-Philippe Theberge This program is free software: you can redistribute it and/or modify it under the terms of the GNU General Public License as published by the Free Software Foundation, either version 3 of the License, or (at your option) any later version. This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details. A full copy of the GPL license can be found at http://www.gnu.org/licenses/.|