Skip to content

Currency 0.4.0

Pre-release
Pre-release
Compare
Choose a tag to compare
@Mordil Mordil released this 23 Feb 22:33
cfc56f8

API Docs are always available at peek-travel.github.io/swift-currency

Major

  • The protocol hierarchy implementation of AnyCurrency and CurrencyProtocol has been reimplemented to resolve incorrect Swift semantics (#25)
    • The most notable breaking changes are to initializers:
      • init(minorUnits) is now generic on BinaryInteger
      • init(_:) is now failable and requires the amount: label
    • The inverseAmount computed property is now a method named negated()
    • Arithmetic is now only possible between instances of currencies
  • Localization through String Interpolation now requires the localize: prefix (#25)
    • e.g. "\(localize: JPY(300))"

Minor

  • The XXX (No Currency Transaction) currency has been added (#20)

Patch

  • Fixed #17 by making the init(_:) failable to handle .nan values (#25)

Misc

  • API documentation is now available for each latest release (#26)
  • The project now has several maturity benchmarks
    • Code coverage (#19)
    • Linux unit testing (#24)
    • macOS unit testing for Swift 5.2 (#27)
    • Code Climate ratings (#28)