feat: add AED currency support and user node groups
This commit is contained in:
22
test_aed_currency.rs
Normal file
22
test_aed_currency.rs
Normal file
@@ -0,0 +1,22 @@
|
||||
use rust_decimal::Decimal;
|
||||
use rust_decimal_macros::dec;
|
||||
|
||||
fn main() {
|
||||
// Test AED currency conversion
|
||||
let usd_amount = dec!(100.0); // 100 USD
|
||||
let aed_rate = dec!(3.67); // 1 USD = 3.67 AED
|
||||
|
||||
// Convert USD to AED
|
||||
let aed_amount = usd_amount * aed_rate;
|
||||
println!("100 USD = {:.2} AED", aed_amount);
|
||||
|
||||
// Convert AED back to USD
|
||||
let usd_converted_back = aed_amount / aed_rate;
|
||||
println!("{:.2} AED = {:.2} USD", aed_amount, usd_converted_back);
|
||||
|
||||
// Test formatting
|
||||
println!("Formatted AED: د.إ{:.2}", aed_amount);
|
||||
println!("Formatted USD: ${:.2}", usd_amount);
|
||||
|
||||
println!("AED currency test completed successfully!");
|
||||
}
|
Reference in New Issue
Block a user