You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@myfaces.apache.org by gc...@apache.org on 2012/03/07 20:40:06 UTC
svn commit: r1298059 - in /myfaces/trinidad/branches/1.2.12.7.0-branch:
src/site/xdoc/devguide/configuration.xml
trinidad-api/src/main/resources/trinidad-config.xsd
Author: gcrawford
Date: Wed Mar 7 19:40:05 2012
New Revision: 1298059
URL: http://svn.apache.org/viewvc?rev=1298059&view=rev
Log:
TRINIDAD-2044 Mismatch between trinidad-config.xsd and documentation
Thanks to Yee-Wah
Modified:
myfaces/trinidad/branches/1.2.12.7.0-branch/src/site/xdoc/devguide/configuration.xml
myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/resources/trinidad-config.xsd
Modified: myfaces/trinidad/branches/1.2.12.7.0-branch/src/site/xdoc/devguide/configuration.xml
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.7.0-branch/src/site/xdoc/devguide/configuration.xml?rev=1298059&r1=1298058&r2=1298059&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.7.0-branch/src/site/xdoc/devguide/configuration.xml (original)
+++ myfaces/trinidad/branches/1.2.12.7.0-branch/src/site/xdoc/devguide/configuration.xml Wed Mar 7 19:40:05 2012
@@ -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. This value should be
+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. This value should be
specified as a Gregorian Calendar year.
</p>
</subsection>
Modified: myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/resources/trinidad-config.xsd
URL: http://svn.apache.org/viewvc/myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/resources/trinidad-config.xsd?rev=1298059&r1=1298058&r2=1298059&view=diff
==============================================================================
--- myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/resources/trinidad-config.xsd (original)
+++ myfaces/trinidad/branches/1.2.12.7.0-branch/trinidad-api/src/main/resources/trinidad-config.xsd Wed Mar 7 19:40:05 2012
@@ -145,6 +145,19 @@ the time zone used for date processing a
</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">
<annotation>
@@ -301,6 +314,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>