Class OrderValidityDate

    • Field Summary

      Fields 
      Modifier and Type Field Description
      protected static java.util.regex.Pattern DATE_PATTERN
      Deprecated.
       
      protected java.lang.String dateStr
      Deprecated.
       
      protected java.util.Date datetime
      Deprecated.
       
      protected boolean isLocal
      Deprecated.
       
      static java.lang.String LOCAL
      Deprecated.
       
      protected java.lang.String location
      Deprecated.
       
      protected java.lang.String offset
      Deprecated.
       
      protected java.lang.String timeStr
      Deprecated.
       
      static java.lang.String ZEROED_OFFSET
      Deprecated.
       
    • Constructor Summary

      Constructors 
      Constructor Description
      OrderValidityDate()
      Deprecated.
       
    • Method Summary

      All Methods Instance Methods Concrete Methods Deprecated Methods 
      Modifier and Type Method Description
      boolean equals​(java.lang.Object obj)
      Deprecated.
       
      java.lang.String getDateAsString()
      Deprecated.
      Gets the date as a string in the format "YYYYMMDD".
      java.util.Date getDateTime()
      Deprecated.
      The Date object returned by this method is created by parsing the date and time passed in to the parse(String, String, String, String) method, without taking the offset or location parameters into account.
      java.lang.String getLocation()
      Deprecated.
      Gets the location that the date and time relate to.
      java.lang.String getOffset()
      Deprecated.
      Gets the UTC offset for the time, in the format "[+-][0-9]{2}:[0-9]{2}", e.g "+01:00".
      java.lang.String getTimeAsString()
      Deprecated.
      Gets the time as a string in the format "HH:MM:SS".
      int hashCode()
      Deprecated.
       
      boolean isLocal()
      Deprecated.
      Returns a boolean indicating whether this date and time were specified as local to the user, in which case a UTC offset should also be present and can be retrieved by calling getOffset(), or if the date and time relate to a specific location in which case no offset needs to be provided.
      protected void parse​(java.lang.String dateStr, java.lang.String timeStr, java.lang.String location, java.lang.String offset)
      Deprecated.
      Sets the date, time, location and offset values from the parameters.
      java.lang.String toString()
      Deprecated.
       
      • Methods inherited from class java.lang.Object

        clone, finalize, getClass, notify, notifyAll, wait, wait, wait
    • Field Detail

      • ZEROED_OFFSET

        public static final java.lang.String ZEROED_OFFSET
        Deprecated.
        See Also:
        Constant Field Values
      • DATE_PATTERN

        protected static final java.util.regex.Pattern DATE_PATTERN
        Deprecated.
      • dateStr

        protected java.lang.String dateStr
        Deprecated.
      • timeStr

        protected java.lang.String timeStr
        Deprecated.
      • location

        protected java.lang.String location
        Deprecated.
      • offset

        protected java.lang.String offset
        Deprecated.
      • datetime

        protected java.util.Date datetime
        Deprecated.
      • isLocal

        protected boolean isLocal
        Deprecated.
    • Constructor Detail

      • OrderValidityDate

        public OrderValidityDate()
        Deprecated.
    • Method Detail

      • parse

        protected void parse​(java.lang.String dateStr,
                             java.lang.String timeStr,
                             java.lang.String location,
                             java.lang.String offset)
                      throws OrderConfigurationException
        Deprecated.
        Sets the date, time, location and offset values from the parameters.
        Parameters:
        dateStr - A date in the format "YYYYMMDD".
        timeStr - A time in the format "HH:MM:SS".
        location - A location, which can be a place such as "London" or the string "LOCAL". If a location is provided, it is not necessary (or permitted) to provide an offset because it can be inferred from the date, time and location.
        offset - A timezone offset in the format "[+-][0-9]{2}:[0-9]{2}", e.g "+01:00".
        Throws:
        OrderConfigurationException -

        If:

        • Any of dateStr, timeStr or location are null or empty.
        • The location has the value LOCAL but the offset is null or empty.
        • The location has the value LOCAL and the offset is specified in the wrong format.
        • The location was provided (i.e not LOCAL) but an offset was also provided.
        • The value of dateStr or timeStr are in the wrong format.
      • getDateTime

        @Deprecated
        public java.util.Date getDateTime()
        Deprecated.
        The Date object returned by this method is created by parsing the date and time passed in to the parse(String, String, String, String) method, without taking the offset or location parameters into account. Because of this limitation, the Date object returned by this method is not a true representation of this instance of OrderValidityDate, and this method has been deprecated accordingly. Client code should use the methods getDateAsString(), getTimeAsString(), getLocation() and getOffset() instead.
        Gets the date and time as an instance of Date.
        Returns:
        A Date object representing the date and time of this instance of OrderValidityDate, without taking the location or offset into account.
      • getDateAsString

        public java.lang.String getDateAsString()
        Deprecated.
        Gets the date as a string in the format "YYYYMMDD".
        Returns:
        The date as a string.
      • getTimeAsString

        public java.lang.String getTimeAsString()
        Deprecated.
        Gets the time as a string in the format "HH:MM:SS".
        Returns:
        The time as a string.
      • getLocation

        public java.lang.String getLocation()
        Deprecated.
        Gets the location that the date and time relate to.
        Returns:
        The location if specified, otherwise null.
      • getOffset

        public java.lang.String getOffset()
        Deprecated.
        Gets the UTC offset for the time, in the format "[+-][0-9]{2}:[0-9]{2}", e.g "+01:00".
        Returns:
        The timezone offset if specified, otherwise "00:00". The offset is only specified if this instance of OrderValidityDate was constructed with the location LOCAL.
      • isLocal

        public boolean isLocal()
        Deprecated.
        Returns a boolean indicating whether this date and time were specified as local to the user, in which case a UTC offset should also be present and can be retrieved by calling getOffset(), or if the date and time relate to a specific location in which case no offset needs to be provided.
        Returns:
        True if this date relates to the user's local time, false if it relates to a specific location.
      • hashCode

        public int hashCode()
        Deprecated.
        Overrides:
        hashCode in class java.lang.Object
      • equals

        public boolean equals​(java.lang.Object obj)
        Deprecated.
        Overrides:
        equals in class java.lang.Object
      • toString

        public java.lang.String toString()
        Deprecated.
        Overrides:
        toString in class java.lang.Object