Class JodaTimeContextHolder

    • Method Detail

      • resetJodaTimeContext

        public static void resetJodaTimeContext()
        Reset the JodaTimeContext for the current thread.
      • setJodaTimeContext

        public static void setJodaTimeContext​(@Nullable
                                              JodaTimeContext jodaTimeContext)
        Associate the given JodaTimeContext with the current thread.
        Parameters:
        jodaTimeContext - the current JodaTimeContext, or null to reset the thread-bound context
      • getFormatter

        public static DateTimeFormatter getFormatter​(DateTimeFormatter formatter,
                                                     @Nullable
                                                     Locale locale)
        Obtain a DateTimeFormatter with user-specific settings applied to the given base Formatter.
        Parameters:
        formatter - the base formatter that establishes default formatting rules (generally user independent)
        locale - the current user locale (may be null if not known)
        Returns:
        the user-specific DateTimeFormatter