Class CXmlDateUtil


  • public class CXmlDateUtil
    extends java.lang.Object
    Date utility for parsing and formatting Date objects in accordance with the cXML standard.
    • Constructor Summary

      Constructors 
      Constructor Description
      CXmlDateUtil()  
    • Method Summary

      All Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      java.lang.String formatDate​(java.util.Date date)
      Formats a Date instance into a String.
      java.util.Date parseString​(java.lang.String dateString)
      Parses a string into a date following the cXML specification.
      • Methods inherited from class java.lang.Object

        clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
    • Constructor Detail

      • CXmlDateUtil

        public CXmlDateUtil()
    • Method Detail

      • parseString

        public java.util.Date parseString​(java.lang.String dateString)
                                   throws java.text.ParseException
        Parses a string into a date following the cXML specification.
        Parameters:
        dateString - the date String
        Returns:
        a parsed Date object
        Throws:
        java.text.ParseException - when parsing failure occurs
      • formatDate

        public java.lang.String formatDate​(java.util.Date date)
        Formats a Date instance into a String.
        Parameters:
        date - the date to use
        Returns:
        the String representation