Skip to content

Commit

Permalink
Setting the currency style inside getCurrencyFractionDigits. If not s…
Browse files Browse the repository at this point in the history
…et, NSNumberFormatter will not populate the minimum/maximumFractionDigits.

	Change on 2016/01/05 by lougle <lougle@google.com>
-------------
Created by MOE: https://github.com/google/moe
MOE_MIGRATED_REVID=111467641
  • Loading branch information
lougle authored and Keith Stanger committed Jan 6, 2016
1 parent 8ea3130 commit fae2f0d
Showing 1 changed file with 1 addition and 0 deletions.
Expand Up @@ -323,6 +323,7 @@ public static native String getCurrencySymbol(Locale locale, String currencyCode

public static native int getCurrencyFractionDigits(String currencyCode) /*-[
NSNumberFormatter *formatter = AUTORELEASE([[NSNumberFormatter alloc] init]);
[formatter setNumberStyle:NSNumberFormatterCurrencyStyle];
[formatter setCurrencyCode:currencyCode];
return (int) [formatter maximumFractionDigits];
]-*/;
Expand Down

0 comments on commit fae2f0d

Please sign in to comment.