01: package net.suberic.pooka;
02:
03: import java.util.*;
04: import java.text.SimpleDateFormat;
05:
06: /**
07: * This is a little utility class which stores all of the DateFormat classes
08: * that we use.
09: */
10: public class DateFormatter {
11:
12: // the full date. for reply headers such as 'on Friday, Jan 01, 2000,
13: // Greyface <greyface@corporation.co.thud> wrote...'
14: public SimpleDateFormat fullDateFormat;
15:
16: // a time today, used in the message table.
17: public SimpleDateFormat todayFormat;
18:
19: // a date this past week, so we can just say the day rather than the
20: // full date if we wish.
21: public SimpleDateFormat this WeekFormat;
22:
23: // a short format which shows the full date, but doesn't take up much
24: // room.
25: public SimpleDateFormat shortFormat;
26:
27: public DateFormatter() {
28: fullDateFormat = new java.text.SimpleDateFormat(Pooka
29: .getProperty("DateFormat", "EEE, MMM dd, yyyy, hh:mm"));
30: todayFormat = new java.text.SimpleDateFormat(Pooka.getProperty(
31: "FolderTable.TodayDateFormat", "HH:mm"));
32: this WeekFormat = new java.text.SimpleDateFormat(Pooka
33: .getProperty("FolderTable.ThisWeekDateFormat",
34: "EEE HH:mm"));
35: shortFormat = new java.text.SimpleDateFormat(Pooka.getProperty(
36: "FolderTable.DefaultDateFormat", "MM/dd/yy HH:mm"));
37:
38: }
39:
40: }
|