Skip to content

Latest commit

 

History

22 Commits

Folders and files

NameName
Last commit message
Last commit date
 
 
 
 
 
 
 
 
 
 

Repository files navigation

CurrencyConverter

My small currencyconvert in Rust, that only support European Central Bank exchange rates. This is my first project in Rust :)

Example

    let mut Exchanger = Currency_Exchange::Exchange::new();
    let date = NaiveDate::from_ymd(2020, 1, 15);
    Exchanger.init();
    let rate = Exchanger.get_ExchangeRate(Currency_Exchange::Currency_CODE::USD,Currency_Exchange::Currency_CODE::EUR, date).unwrap();
    assert_approx_eq!(rate, 1.1142, 0.00001);

Exchange::new() automatically loads the current exchange rates from the ECB during initialization (https://sdw-wsrest.ecb.europa.eu/service/data/EXR/)

About

No description, website, or topics provided.

Resources

Stars

0 stars

Watchers

1 watching

Forks

Releases

Packages

Contributors

Languages