com.atlassian.confluence.api.impl.service.datetime
Class DateFormatServiceImpl

java.lang.Object
  extended by com.atlassian.confluence.api.impl.service.datetime.DateFormatServiceImpl
All Implemented Interfaces:
DateFormatService

public class DateFormatServiceImpl
extends java.lang.Object
implements DateFormatService


Field Summary
static java.lang.String ADG_DATE_FORMAT
           
static org.joda.time.format.DateTimeFormatter ADG_DATE_FORMATTER
           
 
Constructor Summary
DateFormatServiceImpl(UserAccessor userAccessor, FormatSettingsManager formatSettingsManager, LocaleManager localeManager)
           
 
Method Summary
 java.lang.String getDateFormatPatternForUser()
           
 java.lang.String getFormattedDateByUserLocale(org.joda.time.LocalDateTime date)
          Format the given date in an appropriate format according to the user's locale.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

ADG_DATE_FORMAT

public static final java.lang.String ADG_DATE_FORMAT
See Also:
Constant Field Values

ADG_DATE_FORMATTER

public static final org.joda.time.format.DateTimeFormatter ADG_DATE_FORMATTER
Constructor Detail

DateFormatServiceImpl

public DateFormatServiceImpl(UserAccessor userAccessor,
                             FormatSettingsManager formatSettingsManager,
                             LocaleManager localeManager)
Method Detail

getFormattedDateByUserLocale

public java.lang.String getFormattedDateByUserLocale(org.joda.time.LocalDateTime date)
Description copied from interface: DateFormatService
Format 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:
getFormattedDateByUserLocale in interface DateFormatService
Parameters:
date - the date to format
Returns:
the date formatted accordingly in the current user's locale

getDateFormatPatternForUser

public java.lang.String getDateFormatPatternForUser()
Specified by:
getDateFormatPatternForUser in interface DateFormatService
Returns:
the date format pattern in a string according to the user's locale


Copyright © 2003-2014 Atlassian. All Rights Reserved.