You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by jw...@apache.org on 2011/03/01 23:45:49 UTC
svn commit: r1076043 - in /myfaces/trinidad/trunk:
src/site/xdoc/devguide/configuration.xml
trinidad-api/src/main/resources/trinidad-config.xsd
Author: jwaldman
Date: Tue Mar 1 22:45:49 2011
New Revision: 1076043
URL: http://svn.apache.org/viewvc?rev=1076043&view=rev
Log:
TRINIDAD-2044 Mismatch between trinidad-config.xsd and documentation
Thanks to Yee-Wah Lee for the patch
Modified:
myfaces/trinidad/trunk/src/site/xdoc/devguide/configuration.xml
myfaces/trinidad/trunk/trinidad-api/src/main/resources/trinidad-config.xsd
Modified: myfaces/trinidad/trunk/src/site/xdoc/devguide/configuration.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/src/site/xdoc/devguide/configuration.xml?rev=1076043&r1=1076042&r2=1076043&view=diff
==============================================================================
--- myfaces/trinidad/trunk/src/site/xdoc/devguide/configuration.xml (original)
+++ myfaces/trinidad/trunk/src/site/xdoc/devguide/configuration.xml Tue Mar 1 22:45:49 2011
@@ -226,12 +226,14 @@ while converting strings to Date.
<subsection name="two-digit-year-start">
<p>
The <code><two-digit-year-start></code> element defines the
-year offset that should be used for parsing years with only two digits.
-If it is not set, it is defaulted to year <code>1950</code>. This value is
-used by <code>org.apache.myfaces.trinidad.converter.DateTimeConverter</code>
-while converting strings to Date. This property may also
-be explicitly configured with an EL expression that returns
-Integer object if needed or can be directly harcoded to a integer value.
+100-year span that should be used used by <code>org.apache.myfaces.trinidad.converter.DateTimeConverter</code>
+to parse strings containing 2 digit years. The
+parsed Date will be in the range startDate to startDate + 100 years. For
+example, when the string is "1/1/11" and the two-digit-year-start is set to 1900, the
+DateTimeConverter will parse it into the Date equivalent to 1st January 1911.
+If the property is not set, it is defaulted to year <code>1950</code>.
+This property may be explicitly configured with an EL expression that returns
+Integer object or it can be directly harcoded to a integer value.
</p>
</subsection>
<subsection name="right-to-left">
Modified: myfaces/trinidad/trunk/trinidad-api/src/main/resources/trinidad-config.xsd
URL: http://svn.apache.org/viewvc/myfaces/trinidad/trunk/trinidad-api/src/main/resources/trinidad-config.xsd?rev=1076043&r1=1076042&r2=1076043&view=diff
==============================================================================
--- myfaces/trinidad/trunk/trinidad-api/src/main/resources/trinidad-config.xsd (original)
+++ myfaces/trinidad/trunk/trinidad-api/src/main/resources/trinidad-config.xsd Tue Mar 1 22:45:49 2011
@@ -144,6 +144,20 @@ the time zone used for date processing a
</documentation>
</annotation>
</element>
+
+ <element name="two-digit-year-start" minOccurs="0" maxOccurs="1"
+ type="config:integerExpressionType">
+ <annotation>
+ <documentation>The <two-digit-year-start> element sets the 100-year period used by the
+ DateTimeConverter when parsing a string with 2-digit years. The parsed date will be placed in the
+ range startDate to startDate + 100 years.
+ For example, when the string is "1/1/11" and the two-digit-year-start is set to 1900, the
+ DateTimeConverter will parse it into the Date equivalent to 1st January 1911.
+ The default value for two-digit-year-start is 1950.
+ </documentation>
+ </annotation>
+ </element>
+
<element name="right-to-left" minOccurs="0" maxOccurs="1"
type="config:booleanExpressionType">
@@ -301,6 +315,10 @@ override the locale that converters use
<union memberTypes="long config:expressionType" />
</simpleType>
+ <simpleType name="integerExpressionType">
+ <union memberTypes="integer config:expressionType" />
+ </simpleType>
+
<simpleType name="booleanExpressionType">
<union memberTypes="boolean config:expressionType" />
</simpleType>