Class DateFormatterFactoryImpl
- java.lang.Object
-
- com.atlassian.confluence.core.datetime.DateFormatterFactoryImpl
-
- All Implemented Interfaces:
DateFormatterFactory
public class DateFormatterFactoryImpl extends Object implements DateFormatterFactory
-
-
Constructor Summary
Constructors Constructor Description DateFormatterFactoryImpl(FormatSettingsManager formatSettingsManager, LocaleManager localeManager, com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager)
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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.
-
-
-
Constructor Detail
-
DateFormatterFactoryImpl
public DateFormatterFactoryImpl(FormatSettingsManager formatSettingsManager, LocaleManager localeManager, com.atlassian.sal.api.timezone.TimeZoneManager timeZoneManager)
-
-
Method Detail
-
createForUser
public DateFormatter createForUser()
Description copied from interface:DateFormatterFactory
Obtains a DateFormatter suitable for the current users timezone.NOTE: user locale settings *are* respected, but DateFormatter itself handles that.
- Specified by:
createForUser
in interfaceDateFormatterFactory
-
createGlobal
public DateFormatter createGlobal()
Description copied from interface:DateFormatterFactory
Obtains a DateFormatter that uses the instances default timezone.- Specified by:
createGlobal
in interfaceDateFormatterFactory
- See Also:
TimeZoneManager.getDefaultTimeZone()
-
createFriendlyForUser
public FriendlyDateFormatter createFriendlyForUser(Date now)
Description copied from interface:DateFormatterFactory
Creates a FriendlyDateFormatter for the current user.- Specified by:
createFriendlyForUser
in interfaceDateFormatterFactory
-
createFriendlyForUser
public FriendlyDateFormatter createFriendlyForUser()
Description copied from interface:DateFormatterFactory
Creates a FriendlyDateFormatter for the current user, with the current date/time used for "now".- Specified by:
createFriendlyForUser
in interfaceDateFormatterFactory
-
-