git.hedgecode.org
/
snooker-score-api.git
/ blobdiff
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
shortlog
|
log
|
commit
|
commitdiff
|
tree
raw
|
inline
| side by side
[LIB-5] Collection empty objects,reporting and serializable
[snooker-score-api.git]
/
src
/
main
/
java
/
org
/
hedgecode
/
snooker
/
SnookerScoreApp.java
diff --git
a/src/main/java/org/hedgecode/snooker/SnookerScoreApp.java
b/src/main/java/org/hedgecode/snooker/SnookerScoreApp.java
index
e81bc6e
..
286c966
100644
(file)
--- a/
src/main/java/org/hedgecode/snooker/SnookerScoreApp.java
+++ b/
src/main/java/org/hedgecode/snooker/SnookerScoreApp.java
@@
-16,6
+16,7
@@
package org.hedgecode.snooker;
package org.hedgecode.snooker;
+import java.text.DateFormat;
import java.text.SimpleDateFormat;
import org.hedgecode.snooker.api.APIException;
import java.text.SimpleDateFormat;
import org.hedgecode.snooker.api.APIException;
@@
-45,7
+46,7
@@
public final class SnookerScoreApp {
private static final String UPCOMING_EVENTS = " Upcoming Snooker Events: ";
private static final String INDENT = " ";
private static final String UPCOMING_EVENTS = " Upcoming Snooker Events: ";
private static final String INDENT = " ";
- private static
SimpleDateFormat DATE_FORMAT = new SimpleDateFormat("dd.MM.yyyy")
;
+ private static
final String DATE_FORMAT = "dd.MM.yyyy"
;
private static final int UPCOMING_COUNT = 5;
private static final int UPCOMING_COUNT = 5;
@@
-86,10
+87,11
@@
public final class SnookerScoreApp {
}
private static void printEvent(Event event) {
}
private static void printEvent(Event event) {
+ final DateFormat dateFormat = new SimpleDateFormat(DATE_FORMAT);
System.out.println(
INDENT + event.name()
System.out.println(
INDENT + event.name()
- + " [" +
DATE_FORMAT
.format(event.startDate())
- + " - " +
DATE_FORMAT
.format(event.endDate()) + "]"
+ + " [" +
dateFormat
.format(event.startDate())
+ + " - " +
dateFormat
.format(event.endDate()) + "]"
+ " (" + event.country() + ", " + event.city() + ")"
);
}
+ " (" + event.country() + ", " + event.city() + ")"
);
}