类 JodaTimeContextHolder

    • 方法详细资料

      • resetJodaTimeContext

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

        public static void setJodaTimeContext​(JodaTimeContext jodaTimeContext)
        Associate the given JodaTimeContext with the current thread.
        参数:
        jodaTimeContext - the current JodaTimeContext, or null to reset the thread-bound context
      • getJodaTimeContext

        public static JodaTimeContext getJodaTimeContext()
        Return the JodaTimeContext associated with the current thread, if any.
        返回:
        the current JodaTimeContext, or null if none
      • getFormatter

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