You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@struts.apache.org by cn...@apache.org on 2015/10/09 11:13:50 UTC

[2/4] struts git commit: Added support for RFC3339 with date part only

Added support for RFC3339 with date part only

https://issues.apache.org/jira/browse/WW-4551

Project: http://git-wip-us.apache.org/repos/asf/struts/repo
Commit: http://git-wip-us.apache.org/repos/asf/struts/commit/d95fc639
Tree: http://git-wip-us.apache.org/repos/asf/struts/tree/d95fc639
Diff: http://git-wip-us.apache.org/repos/asf/struts/diff/d95fc639

Branch: refs/heads/master
Commit: d95fc63992f3892519d970b07052776e0401003a
Parents: 9ad9404
Author: Andrea Ligios <an...@gmail.com>
Authored: Wed Oct 7 16:17:38 2015 +0200
Committer: Andrea Ligios <an...@gmail.com>
Committed: Wed Oct 7 16:17:38 2015 +0200

----------------------------------------------------------------------
 .../com/opensymphony/xwork2/conversion/impl/DateConverter.java  | 5 +++--
 1 file changed, 3 insertions(+), 2 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/struts/blob/d95fc639/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DateConverter.java
----------------------------------------------------------------------
diff --git a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DateConverter.java b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DateConverter.java
index 076817d..bde36f7 100644
--- a/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DateConverter.java
+++ b/core/src/main/java/com/opensymphony/xwork2/conversion/impl/DateConverter.java
@@ -93,9 +93,10 @@ public class DateConverter extends DefaultTypeConverter {
         DateFormat d2 = DateFormat.getDateInstance(DateFormat.MEDIUM, locale);
         DateFormat d3 = DateFormat.getDateInstance(DateFormat.LONG, locale);
 
-        DateFormat rfc3339 = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
+        DateFormat rfc3339         = new SimpleDateFormat("yyyy-MM-dd'T'HH:mm:ss");
+        DateFormat rfc3339dateOnly = new SimpleDateFormat("yyyy-MM-dd");
 
-        return new DateFormat[]{dt1, dt2, dt3, rfc3339, d1, d2, d3};
+        return new DateFormat[]{dt1, dt2, dt3, rfc3339, d1, d2, d3, rfc3339dateOnly};
     }
 
 }