Branch for 2.3.x tree
git-svn-id: https://svn.libreccm.org/ccm/trunk@3532 8810af33-2d31-482b-a856-94f89814c4dfmaster
parent
c56db8ae78
commit
0f2473a873
|
|
@ -33,8 +33,7 @@ import org.apache.log4j.Logger;
|
|||
*/
|
||||
public class ConfigError extends Error {
|
||||
|
||||
private static final Logger s_log = Logger.getLogger
|
||||
(ConfigError.class);
|
||||
private static final long serialVersionUID = 5224480607138738741L;
|
||||
|
||||
/**
|
||||
* Constructs a new configuration error with the content
|
||||
|
|
|
|||
|
|
@ -25,34 +25,34 @@ import java.util.Date;
|
|||
import java.text.DateFormat;
|
||||
|
||||
/**
|
||||
* An alternate formatter for java.util.Date objects,
|
||||
* outputing the date in 'medium' format. The time
|
||||
* is ommitted.
|
||||
* An alternate formatter for java.util.Date objects, outputing the date in
|
||||
* 'medium' format. The time is ommitted.
|
||||
*
|
||||
* @author unkknown
|
||||
* @author Sören Bernstein <quasi@quasiweb.de>
|
||||
*/
|
||||
public class DateFormatter implements Formatter {
|
||||
|
||||
private static DateFormatterConfig m_config;
|
||||
|
||||
public static final DateFormatterConfig getConfig() {
|
||||
if (m_config == null) {
|
||||
m_config = new DateFormatterConfig();
|
||||
m_config.load();
|
||||
}
|
||||
return m_config;
|
||||
}
|
||||
|
||||
|
||||
private static DateFormatterConfig m_config;
|
||||
|
||||
public static final DateFormatterConfig getConfig() {
|
||||
if (m_config == null) {
|
||||
m_config = new DateFormatterConfig();
|
||||
m_config.load();
|
||||
}
|
||||
return m_config;
|
||||
}
|
||||
|
||||
@Override
|
||||
public String format(Object value) {
|
||||
Date date = (Date)value;
|
||||
|
||||
Date date = (Date) value;
|
||||
|
||||
Locale locale = GlobalizationHelper.getNegotiatedLocale();
|
||||
|
||||
DateFormat format = DateFormat.getDateInstance
|
||||
(DateFormat.MEDIUM, locale);
|
||||
|
||||
DateFormat format = DateFormat
|
||||
.getDateInstance(DateFormat.MEDIUM, locale);
|
||||
|
||||
return format.format(date);
|
||||
}
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue