All Versions
4
Latest Version
Avg Release Cycle
604 days
Latest Release
1330 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 --"