Class DateFormatServiceImpl
- java.lang.Object
- 
- com.atlassian.confluence.api.impl.service.datetime.DateFormatServiceImpl
 
- 
- All Implemented Interfaces:
- DateFormatService
 
 public class DateFormatServiceImpl extends Object implements DateFormatService 
- 
- 
Field SummaryFields Modifier and Type Field Description static StringADG_DATE_FORMATstatic org.joda.time.format.DateTimeFormatterADG_DATE_FORMATTER
 - 
Constructor SummaryConstructors Constructor Description DateFormatServiceImpl(UserPreferencesAccessor userPreferencesAccessor, FormatSettingsManager formatSettingsManager, LocaleManager localeManager)
 - 
Method SummaryAll Methods Instance Methods Concrete Methods Modifier and Type Method Description StringgetDateFormatPatternForUser()StringgetFormattedDateByUserLocale(org.joda.time.LocalDateTime date)Format the given date in an appropriate format according to the user's locale.
 
- 
- 
- 
Field Detail- 
ADG_DATE_FORMATpublic static final String ADG_DATE_FORMAT - See Also:
- Constant Field Values
 
 - 
ADG_DATE_FORMATTERpublic static final org.joda.time.format.DateTimeFormatter ADG_DATE_FORMATTER 
 
- 
 - 
Constructor Detail- 
DateFormatServiceImplpublic DateFormatServiceImpl(UserPreferencesAccessor userPreferencesAccessor, FormatSettingsManager formatSettingsManager, LocaleManager localeManager) 
 
- 
 - 
Method Detail- 
getFormattedDateByUserLocalepublic String getFormattedDateByUserLocale(org.joda.time.LocalDateTime date) Description copied from interface:DateFormatServiceFormat the given date in an appropriate format according to the user's locale. This can be used to display date to the user. Note that this does not perform timezone conversion.- Specified by:
- getFormattedDateByUserLocalein interface- DateFormatService
- Parameters:
- date- the date to format
- Returns:
- the date formatted accordingly in the current user's locale
 
 - 
getDateFormatPatternForUserpublic String getDateFormatPatternForUser() - Specified by:
- getDateFormatPatternForUserin interface- DateFormatService
- Returns:
- the date format pattern in a string according to the user's locale
 
 
- 
 
-