All Versions
4
Latest Version
Avg Release Cycle
604 days
Latest Release
1555 days ago

Changelog History

  • v0.3.1 Changes

    August 06, 2020

    🍱 🌟 What's New in accounting v0.3.1

    • #17 Proposal: Please start using Semantic Versioning (by @KateGo520)
  • v0.3 Changes

    December 24, 2019

    accounting v0.3 includes many contributions. Thank you to all who have contributed in this great work! 🙇

    🌟 What's New in accounting v0.3

    • 👍 #7 Support github.com/cockroachdb/apd for BigDecimal numbers (by @tamalsaha)
    • 👍 #10 Add support for github.com/shopspring/decimal Add support for github.com/shopspring/decimal (by @Dexus)
    • 0️⃣ #11 Add Function DefaultAccounting and NewAccounting (by @Dexus)
    • #13 Go modules (by @akkumar)
    • #14 Use formattedNumber to format zero (by @bykof)
    • #15 Locale Info and UnformatNumber (by @djackreuter)
  • v0.2 Changes

    December 11, 2016
    • 0️⃣ the default format for negative numbers has been changed
    • 👍 32-bit support
  • v0.1 Changes

    August 22, 2015

    👍 big.Float support has been added

    ac = accounting.Accounting{Symbol: "$", Precision: 2} fmt.Println(ac.FormatMoneyBigFloat(big.NewFloat(123456789.213123))) // "$123,456,789.21"fmt.Println(ac.FormatMoneyBigFloat(big.NewFloat(12345678))) // "$12,345,678.00"ac = accounting.Accounting{Symbol: "€", Precision: 2, Thousand: ".", Decimal: ","} fmt.Println(ac.FormatMoneyBigFloat(big.NewFloat(4999.99))) // "€4.999,99"fmt.Println(ac.FormatMoneyBigFloat(big.NewFloat(-4999.99))) // "€-4.999,99"ac = accounting.Accounting{Symbol: "£ ", Precision: 0} fmt.Println(ac.FormatMoneyBigFloat(big.NewFloat(-500000))) // "£ -500,000"ac = accounting.Accounting{Symbol: "GBP", Precision: 0, Format: "%s %v", FormatNegative: "%s (%v)", FormatZero: "%s --"} fmt.Println(ac.FormatMoneyBigFloat(big.NewFloat(1000000))) // "GBP 1,000,000"fmt.Println(ac.FormatMoneyBigFloat(big.NewFloat(-5000))) // "GBP (5,000)"fmt.Println(ac.FormatMoneyBigFloat(big.NewFloat(0))) // "GBP --"