Uploaded image for project: 'Commons Lang'
  1. Commons Lang
  2. LANG-1246

Enhancement to add utility to convert Date to XMLGregorianCalendar

    XMLWordPrintableJSON

Details

    • Improvement
    • Status: Closed
    • Minor
    • Resolution: Won't Fix
    • None
    • None
    • lang.time.*
    • None

    Description

      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 around.

      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.

      Attachments

        Activity

          People

            Unassigned Unassigned
            dashmore Derek C. Ashmore
            Votes:
            0 Vote for this issue
            Watchers:
            2 Start watching this issue

            Dates

              Created:
              Updated:
              Resolved: