Class QuoteExpirationTimeConverter

java.lang.Object
de.hybris.platform.yacceleratorstorefront.util.QuoteExpirationTimeConverter

public final class QuoteExpirationTimeConverter extends Object
Utility class for converting quote expiration time.
  • Method Details

    • convertDateToString

      public static String convertDateToString(Date date, String pattern, 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 Date convertStringToDate(String date, String pattern, 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