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
 String getDateFormatPatternForUser()
           
 String getFormattedDateByUserLocale(org.joda.time.LocalDateTime date)
          Format the given date in an appropriate format according to the user's locale.
 

Method Detail

getFormattedDateByUserLocale

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

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


Copyright © 2003–2015 Atlassian. All rights reserved.