@InjectableComponent public interface DateTimeFormatterFactory
DateTimeFormatterinstances within JIRA. By default a formatter will be configured to use the JIRA default time zone, locale, and date style.
relativedate style. To get a "smart" formatter that automatically uses the time zone and locale of the currently logged in user, create a new formatter by calling
DateTimeFormatter.forLoggedInUser()on the formatter returned by this method, e.g.:
DateTimeFormatter userFormatter = dateTimeFormatterFactory.formatter().forLoggedInUser();Note that since JIRA 5.0 you can get a
DateTimeFormatterinjected directly into your class (in that case there is no need to use this factory class).
A formatter obtained in this fashion may be safely reused across requests.
Copyright © 2002-2016 Atlassian. All Rights Reserved.