[ https://issues.apache.org/jira/browse/WW-4551?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=14951703#comment-14951703 ]
ASF subversion and git services commented on WW-4551: ----------------------------------------------------- Commit f5d455da121840b39ce2a960011363d5ae2af12a in struts's branch refs/heads/support-2-3 from [~lukasz03] [ https://git-wip-us.apache.org/repos/asf?p=struts.git;h=f5d455d ] WW-4551 Adds support for conversion of RFC3339 dates with date part only > Allowing conversion of RFC3339 dates with date part only (yyyy-MM-dd) as per > HTML5 and w3 standard for <input type="date" /> (and others). > ------------------------------------------------------------------------------------------------------------------------------------------ > > Key: WW-4551 > URL: https://issues.apache.org/jira/browse/WW-4551 > Project: Struts 2 > Issue Type: Improvement > Components: Core Actions > Affects Versions: 2.3.24 > Reporter: Andrea Ligios > Assignee: Christoph Nenning > Fix For: 2.3.x > > > Facts: > - {code:xml}<input type="date" />{code} is the HTML5 standard for inputing > dates. It works in many browsers: Chrome, Opera, almost every mobile browsers > - where it is fundamental - and the coverage can only grow. > - [w3 has chosen the RFC3339 *with date > only*|http://www.w3.org/TR/html-markup/input.date.html#input.date.attrs.value] > as *value format* {code}yyyy-MM-dd{code} while transparently handling the > *display format* according to the Locale. > This means that, for example, americans see {code}MM/dd/yyyy{code}, italians > see {code}dd/MM/yyyy{code}, but both of them send {code}yyyy-MM-dd{code} to > the server. *Without the time part*. > - Struts Date Converter already works for: > {code:title=DateConverter.java|borderStyle=solid} > DateFormat dt1 = DateFormat.getDateTimeInstance(DateFormat.SHORT, > DateFormat.LONG, locale); > DateFormat dt2 = DateFormat.getDateTimeInstance(DateFormat.SHORT, > DateFormat.MEDIUM, locale); > DateFormat dt3 = DateFormat.getDateTimeInstance(DateFormat.SHORT, > DateFormat.SHORT, locale); > DateFormat d1 = DateFormat.getDateInstance(DateFormat.SHORT, locale); > 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"); > {code} > with a final fallback to {code:java}DateFormat.SHORT{code} if nothing worked > (in case of Time and Timestamps too). > My idea is: > can we add the support for *date-only RFC3339*, that is the one sent by the > browser, *in addition* to the ones already there ? No existing code would > break, and we'd have a standard, automatic conversion for a popular, growing > *standard*. > I can't see any cons. Can you ? -- This message was sent by Atlassian JIRA (v6.3.4#6332)