From 7189a70a627846767e8ea9ee782bf85b13e55c62 Mon Sep 17 00:00:00 2001 From: Marek Otahal Date: Thu, 5 Jan 2012 23:23:21 +0100 Subject: [PATCH] BlogComments dateString() - use localized date/time format use same method from Blog class, reduce code duplication Signed-off-by: Marek Otahal --- htroot/BlogComments.java | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/htroot/BlogComments.java b/htroot/BlogComments.java index 95d89c076..60808486c 100644 --- a/htroot/BlogComments.java +++ b/htroot/BlogComments.java @@ -32,10 +32,8 @@ import java.io.File; import java.io.IOException; import java.io.PrintWriter; -import java.text.SimpleDateFormat; import java.util.Date; import java.util.Iterator; -import java.util.Locale; import net.yacy.cora.document.UTF8; import net.yacy.cora.protocol.HeaderFramework; @@ -54,11 +52,8 @@ import de.anomic.server.serverSwitch; public class BlogComments { - private final static SimpleDateFormat SIMPLE_FORMATTER = new SimpleDateFormat("yyyy/MM/dd HH:mm:ss", Locale.US); - // TODO: make userdefined date/time-strings (localisation) - public static String dateString(final Date date) { - return SIMPLE_FORMATTER.format(date); + return Blog.dateString(date); } public static serverObjects respond(final RequestHeader header, serverObjects post, final serverSwitch env) {