Class QuoteExpirationTimeConverter


  • public final class QuoteExpirationTimeConverter
    extends java.lang.Object
    Utility class for converting quote expiration time.
    • Method Summary

      All Methods Static Methods Concrete Methods 
      Modifier and Type Method Description
      static java.lang.String convertDateToString​(java.util.Date date, java.lang.String pattern, java.util.Locale locale)
      Converts quote expiration time from Date to String.
      static java.util.Date convertStringToDate​(java.lang.String date, java.lang.String pattern, java.util.Locale locale)
      Converts quote expiration time from String to Date by adjusting the time part to end of day (23:59:59).
      • Methods inherited from class java.lang.Object

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

      • convertDateToString

        public static java.lang.String convertDateToString​(java.util.Date date,
                                                           java.lang.String pattern,
                                                           java.util.Locale locale)
        Converts quote expiration time from Date to String.
        Parameters:
        date - the date to be converted
        pattern - the date pattern to be used for conversion
        locale - the locale to be used for conversion
        Returns:
        null or the string representation of the date as per provided date pattern
      • convertStringToDate

        public static java.util.Date convertStringToDate​(java.lang.String date,
                                                         java.lang.String pattern,
                                                         java.util.Locale locale)
        Converts quote expiration time from String to Date by adjusting the time part to end of day (23:59:59).
        Parameters:
        date - the string representation of quote expiration time
        pattern - the date pattern to be used for conversion
        locale - the locale to be used for conversion
        Returns:
        null if the string representation of expiration time is null or empty, otherwise the Date object