com.atlassian.confluence.api.service.datetime
Interface DateFormatService

All Known Implementing Classes:
DateFormatServiceImpl

@ExperimentalApi
public interface DateFormatService

A service to help format dates

Since:
5.5

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.
 

Method Detail

getFormattedDateByUserLocale

java.lang.String getFormattedDateByUserLocale(org.joda.time.LocalDateTime date)
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.

Parameters:
date - the date to format
Returns:
the date formatted accordingly in the current user's locale

getDateFormatPatternForUser

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


Copyright © 2003-2014 Atlassian. All Rights Reserved.