Class CustomDate

  • All Implemented Interfaces:
    java.io.Serializable, java.lang.Cloneable, java.lang.Comparable<java.util.Date>

    public class CustomDate
    extends java.util.Date
    See Also:
    Serialized Form
    • Method Summary

      All Methods Static Methods Instance Methods Concrete Methods 
      Modifier and Type Method Description
      static CustomDate convertToCustomDate​(java.util.Date input)
      Parse the input date to fetch only date part and return the corresponding CustomDate instance
      static CustomDate parseInput​(java.lang.String input)
      Supports parsing of date string in format ISO Local Date eg '2011-12-03' ISO Date with offset eg '2011-12-03+01:00' or "2002-09-24Z"
      java.lang.String toString()  
      • Methods inherited from class java.util.Date

        after, before, clone, compareTo, equals, from, getDate, getDay, getHours, getMinutes, getMonth, getSeconds, getTime, getTimezoneOffset, getYear, hashCode, parse, setDate, setHours, setMinutes, setMonth, setSeconds, setTime, setYear, toGMTString, toInstant, toLocaleString, UTC
      • Methods inherited from class java.lang.Object

        getClass, notify, notifyAll, wait, wait, wait
    • Method Detail

      • parseInput

        public static CustomDate parseInput​(java.lang.String input)
        Supports parsing of date string in format ISO Local Date eg '2011-12-03' ISO Date with offset eg '2011-12-03+01:00' or "2002-09-24Z"
        Parameters:
        input - string with date value
        Returns:
        instance of CustomDate after parsing input string
      • convertToCustomDate

        public static CustomDate convertToCustomDate​(java.util.Date input)
        Parse the input date to fetch only date part and return the corresponding CustomDate instance
        Parameters:
        input - Instance of java.util.date
        Returns:
        the CustomDate instance with only date part.
      • toString

        public java.lang.String toString()
        Overrides:
        toString in class java.util.Date