<turbo-stream action="append" target="posts_list"><template>    <div class="postbit" id="323750" data-post-id="323750">
  <section>
    <div class="post-wrap">


					<div class="post-header">
		        <div class="user-avatar">
		          <img alt="kip" src="https://forum.elixirforum.com/user_avatar/forum.elixirforum.com/kip/120/1440_2.png" width="120" height="120" />
		        </div>
					
						<div class="user-details">
		          <div class="user-name">
		            <h3>
                  kip
                  </h3>
		          </div>
						
			          <div class="user-title">
									<span>ex_cldr Core Team</span>
			          </div>
						</div>
					
					</div>

	        <div class="thread-main">
	            <div class="post-body" data-turbo="false">
								<p><a href="https://hex.pm/packages/ex_money" rel="nofollow">ex_money</a> is built upon <a href="https://hex.pm/packages/ex_cldr" rel="nofollow">ex_cldr</a> so localisation is an intrinsic part of the library:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir">iex&gt; m = Money.new(:USD, 100)
Money.new(:USD, "100")

# Locale-specific formatting
iex&gt; Money.to_string(m, locale: :de)
{:ok, "100,00 $"}

iex&gt; Money.to_string(m, locale: :de, format: :long)
{:ok, "100 US-Dollar"}

iex&gt; Money.to_string(m, locale: :es, format: :long)
{:ok, "100 dólares estadounidenses"}

# Locale specific parsing (which take care to understand
# the locales decimal and grouping separators
iex&gt; Money.parse("100,00 $", locale: :de)
Money.new(:USD, "100.00")

# Return display names that can be used in UI for
# example, as column headings
iex&gt; Cldr.Currency.display_name :USD, locale: :de
{:ok, "US-Dollar"}

iex&gt; Cldr.Currency.display_name :USD, locale: :ar
{:ok, "دولار أمريكي"}
</code></pre>
<p>And although not strictly localisation, <code>ex_money</code> knows all the <a href="https://en.wikipedia.org/wiki/ISO_4217" rel="nofollow">ISO4217 currency formats</a> so rounding is done to the correct number of digits when required and formatting displays the correct number of decimals. For example:</p>
<pre data-code-wrap="elixir"><code class="lang-elixir"># JPY has no decimal places (in common use at least)
iex&gt; Money.to_string Money.new(:JPY, 54321)
{:ok, "¥54,321"}

# Tunisian Dinar has three decimal places
iex&gt; Money.to_string Money.new(:TND, "1000.12345")
{:ok, "TND 1,000.123"}

# Swiss Franc cash smallest unit is 5 centimes.
# Rounding is `:half_even`
iex&gt; Money.round Money.new(:CHF, "123.73"), currency_digits: :cash
Money.new(:CHF, "123.75")
</code></pre> 
	            </div>

	            <div class="base-line">
	                <div class="thread-counters">
	                    <span class="thread-count count-likes js-likers-trigger" title="Likes" data-post-id="323750" data-batch-url="/posts/batch_likers">
                        5
                      </span>
                      <!-- <span class="thread-count js-solved-indicator" title="Marked as solution"></span> -->
	                </div>
	                <div class="go-to-post">
	                  <a title="Go to post" alt="Go to post" href="https://forum.elixirforum.com/t/how-to-get-accounts-where-balance-0-using-ex-money/62181/25">Post #24</a>
	                </div>
	            </div>
              <div id="likers-container-323750" 
                   class="likers-container"
                   data-first-post="false"
                   data-batch-url="/posts/batch_likers">
                   <div class="likers-placeholder" 
                     data-likers-post-id="323750"
                     data-batch-url="/posts/batch_likers">
                  <div class="post-likers"></div>
                </div>
              </div>
	        </div>
			

    </div>

    <div class="triangle-top-right type-last-post cat-last-post" title="Last post!"></div>
  </section>
</div>
</template></turbo-stream><turbo-stream action="replace" target="load-more-container"><template><div id="load-more-container" class="load-more-container">
    <span class="all-loaded">— All posts loaded —</span>
</div></template></turbo-stream>