- if (footnotes.size() > 0) {
- lines.add("");
- lines.add("");
- lines.add("");
- lines.add("");
- for (int i = 0; i < footnotes.size(); i++) {
- lines.add("[" + (i + 1) + "] " + footnotes.get(i));
- }
+ return lines;
+ }
+
+ /**
+ * Reformat the date if possible.
+ *
+ * @param date
+ * the input date
+ *
+ * @return the reformated date, or the same value if it was not parsable
+ */
+ static protected String date(String date) {
+ SimpleDateFormat out = new SimpleDateFormat("yyyy/MM/dd");
+
+ long epoch = 0;
+ try {
+ epoch = Long.parseLong(date);
+ } catch (Exception e) {
+ epoch = 0;