|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||
java.lang.Objectorg.archive.wayback.util.Timestamp
public class Timestamp
Represents a moment in time as a 14-digit string, and interally as a Date.
| Constructor Summary | |
|---|---|
Timestamp()
Constructor |
|
Timestamp(Date date)
Construct and initialize structure from an Date |
|
Timestamp(int sse)
Construct and initialize structure from an integer number of seconds since the epoch. |
|
Timestamp(String dateStr)
Construct and initialize structure from a 14-digit String timestamp. |
|
| Method Summary | |
|---|---|
int |
absDistanceFromTimestamp(Timestamp otherTimeStamp)
function that calculates integer seconds between this records timeStamp and the arguments timeStamp. |
static Timestamp |
currentTimestamp()
|
static Calendar |
dateStrToCalendar(String dateStr)
cleanup the dateStr argument assuming earliest values, and return a GMT calendar set to the time described by the dateStr. |
int |
distanceFromTimestamp(Timestamp otherTimeStamp)
function that calculates integer seconds between this records timeStamp and the arguments timeStamp. |
static Timestamp |
earliestTimestamp()
|
static Timestamp |
fromSse(int sse)
|
Date |
getDate()
|
String |
getDateStr()
|
String |
getDay()
|
String |
getMonth()
|
String |
getYear()
|
static Timestamp |
latestTimestamp()
|
static String |
padEndDateStr(String timestamp)
clean up timestamp argument assuming latest possible values for missing or bogus digits. |
static String |
padStartDateStr(String timestamp)
clean up timestamp argument assuming earliest possible values for missing or bogus digits. |
static Timestamp |
parseAfter(String dateStr)
|
static Timestamp |
parseBefore(String dateStr)
|
String |
prettyDate()
|
String |
prettyDateTime()
|
String |
prettyTime()
|
void |
setDate(Date date)
set internal structure using Date argument |
void |
setDateStr(String dateStr)
initialize interal data structures for this Timestamp from the 14-digit argument. |
void |
setSse(int sse)
set internal structure using seconds since the epoch integer argument |
int |
sse()
|
| Methods inherited from class java.lang.Object |
|---|
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
| Constructor Detail |
|---|
public Timestamp()
public Timestamp(String dateStr)
dateStr - public Timestamp(int sse)
sse - public Timestamp(Date date)
date - | Method Detail |
|---|
public void setDate(Date date)
date - public Date getDate()
public void setSse(int sse)
sse - public void setDateStr(String dateStr)
dateStr - public String getDateStr()
public int sse()
public int absDistanceFromTimestamp(Timestamp otherTimeStamp)
otherTimeStamp -
public int distanceFromTimestamp(Timestamp otherTimeStamp)
otherTimeStamp -
public String getYear()
public String getMonth()
public String getDay()
public String prettyDate()
public String prettyTime()
public String prettyDateTime()
public static Calendar dateStrToCalendar(String dateStr)
dateStr -
public static String padEndDateStr(String timestamp)
timestamp - String
public static String padStartDateStr(String timestamp)
timestamp - String
public static Timestamp parseBefore(String dateStr)
dateStr -
public static Timestamp parseAfter(String dateStr)
dateStr -
public static Timestamp fromSse(int sse)
sse -
public static Timestamp currentTimestamp()
public static Timestamp latestTimestamp()
public static Timestamp earliestTimestamp()
|
||||||||||
| PREV CLASS NEXT CLASS | FRAMES NO FRAMES | |||||||||
| SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD | |||||||||