commons-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "Derek C. Ashmore (JIRA)" <>
Subject [jira] [Commented] (LANG-1246) Enhancement to add utility to convert Date to XMLGregorianCalendar
Date Fri, 24 Jun 2016 13:30:16 GMT


Derek C. Ashmore commented on LANG-1246:

I can see that thought as XMLGregorianCalendar is in a javax package. Still seems to keep
in step with the stated Commons charter/mission. Is there a better place for this utility
to reside?  I scanned the other Commons products and didn't find anything. 

> Enhancement to add utility to convert Date to XMLGregorianCalendar
> ------------------------------------------------------------------
>                 Key: LANG-1246
>                 URL:
>             Project: Commons Lang
>          Issue Type: Improvement
>          Components: lang.time.*
>            Reporter: Derek C. Ashmore
>            Priority: Minor
>             Fix For: 3.5
> I've frequently had a need to convert a Date (java.util) into a XMLGregorianCalendar
(javax.xml.datatype).  This need frequently comes up when coding SOAP Web Service clients.
> Specifically, I propose a minor addition to DateUtils as follows:
> public static XMLGregorianCalendar toXMLGregorianCalendar (final Date date)
> XMLGregorianCalendar has the ability to convert itself to a Date, but not the other way
> Rather than copy a utility to do this from project to project, I'd prefer the utility
be centralized.
> A pull request is forthcoming.  Thanks for looking at this.

This message was sent by Atlassian JIRA

View raw message