}
FetchProfile completeProfile = MessageUtils.createFetchProfile( true, null );
currentFolder.fetch( pagedMessages, completeProfile );
String[][] messageStringArray = new String[pageSize][MessageListFields.values().length];
Preferences preferences = SessionManager.get().getPreferences();
// get date formats for message list date
Locale locale = SessionManager.get().getLocale();
TimeZone timezone = SessionManager.get().getTimeZone();
String datePattern = this.applicationContext.getMessage(
CubusConstants.MESSAGELIST_DATE_FORMAT_PATTERN, null, locale );
String timePattern = this.applicationContext.getMessage(
CubusConstants.MESSAGELIST_TIME_FORMAT_PATTERN, null, locale );
NumberFormat sizeFormat = MessageUtils.createSizeFormat( locale );
DateFormat dateFormat = null;
DateFormat timeFormat = null;
if ( preferences.isShortTimeFormat() ) {
dateFormat = new SimpleDateFormat( datePattern, locale );
timeFormat = new SimpleDateFormat( timePattern, locale );
timeFormat.setTimeZone( timezone );
}
else {
dateFormat = new SimpleDateFormat( datePattern + " " + timePattern, locale );
}
dateFormat.setTimeZone( timezone );
Date today = Calendar.getInstance( timezone ).getTime();
for (int i = 0; i < pageSize; i++) {
if ( preferences.isShortTimeFormat()
&& DateUtils.isSameDay( today, pagedMessages[i].getSentDate() ) ) {
// show only time
ConvertUtil.convertToStringArray( currentFolder, pagedMessages[i], messageStringArray[i],
timeFormat, sizeFormat );
}