public class DateFormatterFactoryImpl extends Object implements DateFormatterFactory
| Constructor and Description |
|---|
DateFormatterFactoryImpl(FormatSettingsManager formatSettingsManager,
LocaleManager localeManager,
com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager) |
| Modifier and Type | Method and Description |
|---|---|
DateFormatter |
createForUser()
Obtains a DateFormatter suitable for the current users timezone.
|
FriendlyDateFormatter |
createFriendlyForUser()
Creates a FriendlyDateFormatter for the current user, with the current date/time used for "now".
|
FriendlyDateFormatter |
createFriendlyForUser(Date now)
Creates a FriendlyDateFormatter for the current user.
|
DateFormatter |
createGlobal()
Obtains a DateFormatter that uses the instances default timezone.
|
public DateFormatterFactoryImpl(FormatSettingsManager formatSettingsManager, LocaleManager localeManager, com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager)
public DateFormatter createForUser()
DateFormatterFactoryNOTE: user locale settings *are* respected, but DateFormatter itself handles that.
createForUser in interface DateFormatterFactorypublic DateFormatter createGlobal()
DateFormatterFactorycreateGlobal in interface DateFormatterFactorycom.atlassian.sal.api.timezone.TimeZoneManager#getDefaultTimeZone()}public FriendlyDateFormatter createFriendlyForUser(Date now)
DateFormatterFactorycreateFriendlyForUser in interface DateFormatterFactorypublic FriendlyDateFormatter createFriendlyForUser()
DateFormatterFactorycreateFriendlyForUser in interface DateFormatterFactoryCopyright © 2003–2019 Atlassian. All rights reserved.