Releases: Ballasi/num2words
Releases · Ballasi/num2words
v1.2.0
What's new?
- #24 Update
num-bigfloat
dependency to 1.7.1 (thanks to 80Ltrumpet!) - #10 Add support for French (FR, BE, CA, CD, IT)
- #13 Update currencies for Ukrainian
- #17 Add support for different currencies sub-units
- #21 Add non_exhaustive attribute for currencies
New Contributors
- @80Ltrumpet made their first contribution in #24
Full change log
Here is the full change log.
v1.1.0
v1.0.1
v1.0.0
This is the first stable release of num2words
, as the main code structure is done, and only language support is yet to be added. 🎉
What's new?
- Add continuous integration to follow test and code coverage
- Add initial support of large numbers
- Support +/- infinity as inputs
- Make the library compatible with 40+ currencies
- Update documentation accordingly
Full change log
Here is the full change log.
v0.4.1
What's new?
This updated version adds minor improvements
- Adding many
From<>
traits toNum
so that it can be created with something other thani64
andf64
. - Minor code improvements and bug fixes
- Preparation for big-num implementation
Full change log
Here is the full change log.
v0.4.0
What's new?
- Addition of languages preferences
Example:
use num2words::*;
fn print_game_score(home_score: i64, away_score: i64) -> Result<(), Num2Err> {
println!(
"{} - {}",
Num2Words::new(home_score).prefer("nil").to_words()?,
Num2Words::new(away_score).prefer("nil").to_words()?
);
Ok(())
}
- Add default currency names and ability to have different ways to write cents
- Binary now shows the version of the program in words
Full change log
Here is the full change log.
v0.3.0
What's new?
- Usage of specific functions rather than
.output()
. This makes the whole code easier to read and build.
Example:
use num2words::{Num2Words, Output};
assert_eq!(
Num2Words::new(42).output(Output::Ordinal).to_words(),
Ok(String::from("forty-second"))
);
becomes
use num2words::Num2Words;
assert_eq!(
Num2Words::new(42).ordinal().to_words(),
Ok(String::from("forty-second"))
);
- Add
Display
trait toNum2Err
as this may be useful for any usages (e.g., the binary provided with the library) - Update the binary to the new code structure
- Enable the binary to output to
stderr
when providing an error
Full changelog
Here is the full changelog.
v0.2.0
What's new?
- Usage of builder pattern rather than macros
Examples:
use num2words::*;
assert_eq!(
Num2Words::new(42).lang(Lang::English).to_words(),
Ok(String::from("forty-two"))
);
assert_eq!(
Num2Words::new(42).output(Output::Ordinal).to_words(),
Ok(String::from("forty-second"))
);
assert_eq!(
Num2Words::new(42.01).currency(Currency::DOLLAR).to_words(),
Ok(String::from("forty-two dollars and one cent"))
);
- Update of call to
$ num2words --help
- Addition of call
$ num2words --version
- Complete overhaul of the docs and the README.md file
Full changelog
Here is the full changelog.