版预期将添加富文本部件、拆分程序以及日期和数字格式化程序,还将改进开发工具及性能。
The V1.4 release is expected to add a rich text widget, splitters, and date and number formatters as well as improvements to the development tools and performance.
如果电话号码完全没有格式化,比如4155551212,则该方法将该数字格式化为(415)555- 1212。
If a phone number is totally without formatting, as in 4155551212, the method formats the number as (415) 555-1212.
也并非世界上每一个人都会以相同的方式格式化他(她)的数字、日期和货币。
Nor does everyone in the world format his or her Numbers, dates, and currency the same way.
这个参数可与一个数字联合使用,以告知格式化程序有多少个小数点要使用。
This argument can be used with a number, which tells the formatter how many decimal points to use.
清单4显示了如何根据不同地区对数字进行格式化。
Listing 4 shows how to format a number according to a different locale.
这个实参可与一个数字联合使用,以告知格式化程序在小数点前有多少个数位。
This argument can be used with a number, which tells the formatter how many digits to use before the decimal point.
但是有些情况下,您可能想要格式化客户端的数字(例如,接受用户输入并显示值)。
But in some cases, you might want to format the number on the client side (for example, to accept user input and display the value).
再添加一个数字实参就能告诉格式化程序要使用多少个小数位。
Adding a number argument as well will tell the formatter how many decimal digits to use.
数据实际上是采用特定方式格式化的具体信息——其存在形式包括数字、文本、位、字节、事实等等。
Data is essentially specific pieces of information formatted in a particular way — it can exist as Numbers, text, bits, bytes, facts, and so on.
初看上去,格式化数字似乎是一件很容易的任务。
At first glance, formatting Numbers might seem an easy task.
众所周知,并非每个人都用相同的方式格式化数字。
It's common knowledge that not everyone in the world formats their Numbers in the same way.
在这之前,如果开发人员想要面向每个文化格式化数字和日期,他们必须进行Ajax客户端-服务器调用,或是直接在服务器上完成全部的处理。
Previously, if developers wanted to format Numbers and dates correctly for each culture, they were forced to do Ajax client-server calls, or do all the processing on the server directly.
Globalize插件的格式化并不仅限于数字。
Formatting is not just limited to Numbers with the Globalize plugin.
n —用于整数位,以告知格式化程序将此Number对象转变成一个数字。
n — is used for numbers, and denotes to the formatter to turn this Number object into a number.
页面中的数字通常会像图3那样格式化(该例展示了德语中的汇容量统计)。
The number in the page is usually formatted like Figure 3 (this example shows a pool capacity statistic in German).
最后,除了提供用于生成和显示格式化数据的操作之外,fmt库还包含了用于解析面向数字和时间数据的定制标记。
Finally, in addition to providing actions for generating and displaying formatted data, the FMT library also includes custom tags for parsing numerical and time-oriented data.
但是,很多时候数字可能不在服务器上,因此您需要一种方法在客户机上格式化数字,而不需要与服务器会话。
However, many times you might not be on the server, so you need a way to format Numbers on the client, without ever talking to the server.
第二组和第三组标记分别支持对日期和数字进行格式化和解析。
The second and third sets of tags support the formatting and parsing of dates and Numbers, respectively.
格式化日期要比格式化数字复杂和棘手得多,因此出于这个原因,我在这里不会过于详细地介绍格式化日期可用的全部选项。
Formatting dates is much more complicated and involved than formatting Numbers, and for that reason, I won't go into great detail here about all the options you can use with formatting a date.
完全排除了键入和其他的用户输入错误,在显示格式化的数字文本和从同一个字段中接受数字文本输入之间的关系还是不太好处理。
Completely aside from typos and other user-input errors, there's always been an uneasy relationship between displaying formatted numeric text and receiving numeric text input from the same field.
它确保用户输入一个有效的数字,并提供功能,如自动格式化。
It ensures that the user enters a valid number and provides features such as automatic formatting.
除了数字和货币格式化之外,intl还能处理更为复杂的任务,比如拼写出数字—同样地,不只是针对英语,很多其他受支持的locale也可以。
Apart from number and currency formatting, intl handles more sophisticated tasks, like spelling out numbers-again, not only for English but for many supported locales.
例如,“n3 ”就是让格式化程序将这个实参转变成一个具有3个小数点的数字。
For example, "n3" will tell the formatter to make the argument a number with 3 decimal points.
例如“d2 ”就是让格式化程序制作一个小数点左边有两个数位的一个数字。
For example, "d2" will the formatter to make the number forcibly have 2 digits to the left of the decimal point.
如果元素有type属性,则用这个值来决定应该如何格式化每个列表项的数字(罗马数字、阿拉伯数字或按字母次序的字符)。
If the element has a type attribute, use its value to figure out how the number of each list item should be formatted (Roman numerals, Arabic numerals, or alphabetic characters).
format([before[,after[,places[,digits[,form]]]]])对数字字符串进行格式化 13.467.format(2,2,3)返回 "01.35E+001"
string.format([before[,after[,places[,digits[,form]]]]]) Formats a numeric string 13.467.format(2,2,3) returns "01.35E+001"
混合数字自动格式化。
如果格式化的值在格式字符串中出现“0”的位置有一个数字,则此数字被复制到结果字符串中。
If the value being formatted has a digit in the position where the '0' appears in the format string, then that digit is copied to the result string.
这个选项影响到某些程序如何格式化数字、货币、时间和日期。
This option affects how some programs format Numbers, currency, times, and dates.
这个选项影响到某些程序如何格式化数字、货币、时间和日期。
This option affects how some programs format Numbers, currency, times, and dates.
应用推荐