Skip to content

Convert negatives to strings#2

Merged
proprietary merged 5 commits intoproprietary:masterfrom
jasonharrison:master
Nov 28, 2017
Merged

Convert negatives to strings#2
proprietary merged 5 commits intoproprietary:masterfrom
jasonharrison:master

Conversation

@jasonharrison
Copy link
Copy Markdown
Contributor

package main

import (
	"fmt"
	"github.com/zelcon5/cash"
)

func main() {
	var m *cash.Cash

	m = cash.NewUSD().SetCents(1200)
	fmt.Println(m.String())

	m = cash.NewUSD().SetCents(-1200)
	fmt.Println(m.String())
}

Currently prints:

$12.00
$,-12.00

Corrected with my pull request:

$12.00
($12.00)

@proprietary proprietary merged commit 8761904 into proprietary:master Nov 28, 2017
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants