Subversion Repositories currency_converter

Compare Revisions

Regard whitespace Rev 15 → Rev 16

/trunk/PHP/currency_calc.inc.php
127,11 → 127,13
}
 
public function convert_cur($value, $from_cur, $to_cur) {
$exchange_rates_ary = $this->get_exchange_rates_ary();
 
$from_cur = strtoupper(trim($from_cur));
$to_cur = strtoupper(trim($to_cur));
 
if ($from_cur == $to_cur) return $value;
 
$exchange_rates_ary = $this->get_exchange_rates_ary();
 
if (!isset($exchange_rates_ary[$from_cur])) throw new CurCalcException('Source curreny $from_cur not found in exchange data.');
if (!isset($exchange_rates_ary[$to_cur])) throw new CurCalcException('Destination curreny $to_cur not found in exchange data.');
 
/trunk/RTL/VtsCurConv.pas
209,6 → 209,12
fromCur := Trim(UpperCase(fromCur));
toCur := Trim(UpperCase(toCur));
 
if fromCur = toCur then
begin
result := value;
exit;
end;
 
sJSON := GetJsonRaw(HistoricDate);
 
xRoot := TlkJSON.ParseText(sJSON) as TlkJSONobject;