|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.gcube.accounting.common.helper.TimeHelper
public class TimeHelper
| Constructor Summary | |
|---|---|
TimeHelper()
|
|
| Method Summary | |
|---|---|
static String |
format(Calendar c,
boolean time)
Return a human-readable representation of the given calendar. |
static Calendar |
getCalendar(long timestamp)
Computes a Calendar for the given timestamp |
static Calendar |
getCalendar(String timestamp)
|
static Calendar |
getEnd(int year,
int week)
Compute the calendar object corresponding to the end of the week of the given year |
static String |
getHumanReadableTime(long seconds)
Produce a human-readable representation of the given timestamp. |
static String |
getISO8601(long seconds)
Compute a ISO9601 representation of the given timestamp |
static Calendar |
getMonthEnd(int year,
int month)
|
static Calendar |
getMonthStart(int year,
int month)
|
static Calendar |
getStart(int year,
int week)
Compute the calendar object corresponding to the start of the week of the given year |
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public TimeHelper()
| Method Detail |
|---|
public static Calendar getStart(int year,
int week)
year - week -
public static Calendar getMonthStart(int year,
int month)
public static Calendar getEnd(int year,
int week)
year - week -
public static Calendar getMonthEnd(int year,
int month)
public static String format(Calendar c,
boolean time)
c - the calendar object to formattime - whether you want HH:MM:SS information as well
public static Calendar getCalendar(long timestamp)
timestamp -
public static Calendar getCalendar(String timestamp)
throws NumberFormatException
NumberFormatExceptionpublic static String getHumanReadableTime(long seconds)
seconds -
public static String getISO8601(long seconds)
seconds -
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||