From 8b0c8f0d0557d8ab88409cd9691cd1ee279321d5 Mon Sep 17 00:00:00 2001 From: wei <> Date: Tue, 25 Apr 2006 07:01:04 +0000 Subject: Complete #70, update TDateFormat, NumberFormat add zerofill. Update TDatePicker quickstart doc, I18N quickstart doc. --- .../quickstart/protected/pages/Advanced/I18N.page | 124 ++++++++++++++++++++- 1 file changed, 123 insertions(+), 1 deletion(-) (limited to 'demos/quickstart/protected/pages/Advanced/I18N.page') diff --git a/demos/quickstart/protected/pages/Advanced/I18N.page b/demos/quickstart/protected/pages/Advanced/I18N.page index f37e5cf6..4a220c4c 100644 --- a/demos/quickstart/protected/pages/Advanced/I18N.page +++ b/demos/quickstart/protected/pages/Advanced/I18N.page @@ -170,23 +170,145 @@ The time is {time}. <com:TDateFormat Value="12/01/2005" /> -
There are of 4 localized date patterns and 4 localized time patterns. They can be used in any combination. If using a combined pattern, the first must be the date, followed by a space, and lastly the time pattern. For example, full date pattern with short time pattern.
+The Pattern property accepts 4 predefined localized date patterns and 4 predefined localized time patterns. +
You can also specify a custom pattern using the following sub-patterns.
+The date/time format is specified by means of a string time pattern. In this pattern, all ASCII letters are reserved as pattern letters, which are defined as the following:
+
The count of pattern letters determine the format.
+ +(Text): 4 letters uses full form, less than 4, use short or abbreviated form +if it exists. (e.g., "EEEE" produces "Monday", "EEE" produces "Mon")
+ +(Number): the minimum number of digits. Shorter numbers are zero-padded + to this amount (e.g. if "m" produces "6", "mm" produces "06"). Year is + handled specially; that is, if the count of 'y' is 2, the Year will be + truncated to 2 digits. (e.g., if "yyyy" produces "1997", "yy" produces "97".) + Unlike other fields, fractional seconds are padded on the right with zero.
+ +(Text and Number): 3 or over, use text, otherwise use number. (e.g., +"M" produces "1", "MM" produces "01", "MMM" produces "Jan", and "MMMM" +produces "January".)
+ +Any characters in the pattern that are not in the ranges of ['a'..'z'] +and ['A'..'Z'] will be treated as quoted text. For instance, characters +like ':', '.', ' ', and '@' will appear in the resulting time text +even they are not embraced within single quotes.
+ +Examples using the US locale:
+
+
If the Value property is not specified, the current date and time is used.
PRADO's Internationalization framework provide localized currency formatting and number formatting. Please note that the TNumberFormat component provides formatting only, it does not perform current conversion or exchange.
+Numbers can be formatted as currency, percentage, decimal or scientific +numbers by specifying the Type attribute. The valid types are: +
Culture and Currency properties may be specified to format locale specific numbers.
+If someone from US want to see sales figures from a store in
+Germany (say using the EURO currency), formatted using the german
+ currency, you would need to use the attribute Culture="de_DE" to get
+the currency right, e.g. 100,00$. The decimal and grouping separator is
+then also from the de_DE locale. This may lead to some confusion because
+people from US uses the "," (comma) as thousand separator. Therefore a Currency
+attribute is available, so that the output from the following example results in $100.00
+
The Pattern property determines the number of digits, thousand grouping +positions, the number of decimal points and the decimal position. The actual characters that +are used to represent the decimal points and thousand points are culture specific +and will change automatically according to the Culture property. The valid +Pattern characters are: +
Compound messages, i.e., string substitution, can be accomplished with TTranslateParameter. -- cgit v1.2.3