Formatting dates, numbers, and currencies by using localization

Find out Adobe’s doc on Using localization

Sample Code:

            var currencyFormatter:CurrencyFormatter = new CurrencyFormatter();
            currencyFormatter.setStyle(“locale”, LocaleID.DEFAULT);
            currencyFormatter.useCurrencySymbol = true;
            currencyFormatter.trailingZeros = true;

            var dateFormatter: DateTimeFormatter = new DateTimeFormatter();
            dateFormatter.setStyle(“locale”, LocaleID.DEFAULT);
            dateFormatter.dateTimePattern = “MM/dd/yyyy”;

Advertisements
  1. Leave a comment

Leave a Reply

Fill in your details below or click an icon to log in:

WordPress.com Logo

You are commenting using your WordPress.com account. Log Out / Change )

Twitter picture

You are commenting using your Twitter account. Log Out / Change )

Facebook photo

You are commenting using your Facebook account. Log Out / Change )

Google+ photo

You are commenting using your Google+ account. Log Out / Change )

Connecting to %s

%d bloggers like this: