Exam Ref 70-482: Advanced Windows Store App Development Using HTML5 and JavaScript by Roberto Brunetti & Vanni Boncinelli

Exam Ref 70-482: Advanced Windows Store App Development Using HTML5 and JavaScript by Roberto Brunetti & Vanni Boncinelli

Author:Roberto Brunetti & Vanni Boncinelli
Language: eng
Format: epub, pdf
Tags: COMPUTERS / Certification Guides / General
ISBN: 9780735676794
Publisher: Microsoft Press
Published: 2013-09-27T04:00:00+00:00


DecimalFormatter. Formats and parses decimal numbers

PercentFormatter. Formats and parses percentages

PermilleFormatter. Formats and parses permillages

These classes can be used to convert a number to a string or to parse a string to a number. You use these classes by creating a new formatter with or without a language code, and set any necessary properties before calling format or parse. The following code shows how to use the CurrencyFormatter to format and parse a number:

var userCurrency = Windows.System.UserProfile.GlobalizationPreferences.currencies; var currencyFormat = new Windows.Globalization.NumberFormatting.CurrencyFormatter(userCurrency); var currencyNumber = 1234.56; var currencyFormatted = currencyFormat.format(currencyNumber); var currency1Parsed = currencyFormat.parseDouble(currencyFormatted);

When working with the formatters, you can set the isGrouped and fractionDigits properties. These properties control whether you want to display the group separator, and a minimum number of fractional digits you want to display.



Download



Copyright Disclaimer:
This site does not store any files on its server. We only index and link to content provided by other sites. Please contact the content providers to delete copyright contents if any and email us, we'll remove relevant links or contents immediately.