|
5 | 5 | //** Date Utils
|
6 | 6 | //******************************************************************************
|
7 | 7 | /**
|
8 |
| -* Provides static methods |
| 8 | +* Provides static methods used to support web applications |
9 | 9 | *
|
10 | 10 | ******************************************************************************/
|
11 | 11 |
|
@@ -52,9 +52,9 @@ public static TimeZone getUTC(){
|
52 | 52 | //**************************************************************************
|
53 | 53 | //** getDate
|
54 | 54 | //**************************************************************************
|
55 |
| -/** Used to convert a UNIX timestamp in milliseconds to a string in GMT (e.g. |
56 |
| -* "Mon, 20 Feb 2012 13:04:28 GMT"). Note that this method does not rely on |
57 |
| -* the java.text.SimpleDateFormat for performance reasons. |
| 55 | +/** Used to convert a UNIX timestamp in milliseconds to a string in GMT |
| 56 | +* (e.g. "Mon, 20 Feb 2012 13:04:28 GMT"). Note that this method does not |
| 57 | +* rely on the java.text.SimpleDateFormat for performance reasons. |
58 | 58 | * @param milliseconds Milliseconds since January 1, 1970, 00:00:00 UTC
|
59 | 59 | */
|
60 | 60 | public static String getDate(long milliseconds){
|
@@ -63,7 +63,16 @@ public static String getDate(long milliseconds){
|
63 | 63 | return getDate(cal);
|
64 | 64 | }
|
65 | 65 |
|
66 |
| -private static String getDate(Calendar cal){ |
| 66 | + |
| 67 | +//************************************************************************** |
| 68 | +//** getDate |
| 69 | +//************************************************************************** |
| 70 | +/** Used to convert a Calendar to a string in GMT (see above) |
| 71 | +*/ |
| 72 | +public static String getDate(Calendar cal){ |
| 73 | + |
| 74 | +//DO NOT USE java.text.SimpleDateFormat for performance reasons!!! |
| 75 | + |
67 | 76 |
|
68 | 77 | if (!cal.getTimeZone().equals(tz)){
|
69 | 78 | cal = (java.util.Calendar) cal.clone();
|
|
0 commit comments