com.hungry.javacvs.util
Class CVSDate
java.lang.Object
|
+--com.hungry.javacvs.util.CVSDate
- public class CVSDate
- extends java.lang.Object
Class to read and write dates in the format expected by the existing CVS client
|
Constructor Summary |
CVSDate(long timestamp)
|
CVSDate(java.lang.String date_string)
|
| Methods inherited from class java.lang.Object |
clone,
equals,
finalize,
getClass,
hashCode,
notify,
notifyAll,
wait,
wait,
wait |
weekdays
public static java.lang.String[] weekdays
short_months
public static java.lang.String[] short_months
long_months
public static java.lang.String[] long_months
CVSDate
public CVSDate(java.lang.String date_string)
throws CVSInvalidDateString
CVSDate
public CVSDate(long timestamp)
toJavaDate
public java.lang.String toJavaDate()
fromJavaDate
public static CVSDate fromJavaDate(java.lang.String java_date)
toString
public java.lang.String toString()
- Overrides:
- toString in class java.lang.Object
getWeekDay
public int getWeekDay()
getDay
public int getDay()
getMonth
public int getMonth()
getYear
public int getYear()
getHours
public int getHours()
getMinutes
public int getMinutes()
getSeconds
public int getSeconds()
main
public static void main(java.lang.String[] args)
- a little test harness for dates.
reads CVS styled dates, one per line, from System.in, and decomposes them, prints
out the java equivalent, and reconstructs the CVS date (using toString()).