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


Field Summary
static java.lang.String[] long_months
           
static java.lang.String[] short_months
           
static java.lang.String[] weekdays
           
 
Constructor Summary
CVSDate(long timestamp)
           
CVSDate(java.lang.String date_string)
           
 
Method Summary
static CVSDate fromJavaDate(java.lang.String java_date)
           
 int getDay()
           
 int getHours()
           
 int getMinutes()
           
 int getMonth()
           
 int getSeconds()
           
 int getWeekDay()
           
 int getYear()
           
static void main(java.lang.String[] args)
          a little test harness for dates.
 java.lang.String toJavaDate()
           
 java.lang.String toString()
           
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 

Field Detail

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
Constructor Detail

CVSDate

public CVSDate(java.lang.String date_string)
        throws CVSInvalidDateString

CVSDate

public CVSDate(long timestamp)
Method Detail

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()).