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()
DateFormatterFactory
NOTE: user locale settings *are* respected, but DateFormatter itself handles that.
createForUser
in interface DateFormatterFactory
public DateFormatter createGlobal()
DateFormatterFactory
createGlobal
in interface DateFormatterFactory
com.atlassian.sal.api.timezone.TimeZoneManager#getDefaultTimeZone()}
public FriendlyDateFormatter createFriendlyForUser(Date now)
DateFormatterFactory
createFriendlyForUser
in interface DateFormatterFactory
public FriendlyDateFormatter createFriendlyForUser()
DateFormatterFactory
createFriendlyForUser
in interface DateFormatterFactory
Copyright © 2003–2019 Atlassian. All rights reserved.