dgg / nmoneys

.Net implementation of Money Value Object
BSD 3-Clause "New" or "Revised" License
76 stars 14 forks source link

.Format() does not honor number formatting from currency #22

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
Whenever .Format() is called including the amount placeholder, the number is 
formatted according to the default .ToString(), not as a monetary amount.

Original issue reported on code.google.com by danielgo...@gmail.com on 17 Mar 2013 at 9:00

GoogleCodeExporter commented 9 years ago
Richer number formatting can be used targeting specific placeholders like 
`{0:N}` for the amount. Doing so, the currency number formatting will be 
applied to the first member of the format for the money (the amount).
<pre>
Assert.That(1500m.Dkk().Format("{0}"), Is.EqualTo("1500"));
Assert.That(1500m.Dkk().Format("{0:N}"), Is.EqualTo("1.500,00"));
</pre>

Original comment by danielgo...@gmail.com on 17 Mar 2013 at 9:09

GoogleCodeExporter commented 9 years ago
Current feature set is enough to support use case.

Original comment by danielgo...@gmail.com on 17 Mar 2013 at 9:12