net.sourceforge.ganttproject
Class GanttCalendar

java.lang.Object
  |
  +--java.util.Calendar
        |
        +--java.util.GregorianCalendar
              |
              +--net.sourceforge.ganttproject.GanttCalendar
All Implemented Interfaces:
java.lang.Cloneable, java.io.Serializable

public class GanttCalendar
extends java.util.GregorianCalendar
implements java.io.Serializable

Class use for calendar

See Also:
Serialized Form

Field Summary
 
Fields inherited from class java.util.GregorianCalendar
AD, BC
 
Fields inherited from class java.util.Calendar
AM, AM_PM, APRIL, areFieldsSet, AUGUST, DATE, DAY_OF_MONTH, DAY_OF_WEEK, DAY_OF_WEEK_IN_MONTH, DAY_OF_YEAR, DECEMBER, DST_OFFSET, ERA, FEBRUARY, FIELD_COUNT, fields, FRIDAY, HOUR, HOUR_OF_DAY, isSet, isTimeSet, JANUARY, JULY, JUNE, MARCH, MAY, MILLISECOND, MINUTE, MONDAY, MONTH, NOVEMBER, OCTOBER, PM, SATURDAY, SECOND, SEPTEMBER, SUNDAY, THURSDAY, time, TUESDAY, UNDECIMBER, WEDNESDAY, WEEK_OF_MONTH, WEEK_OF_YEAR, YEAR, ZONE_OFFSET
 
Constructor Summary
GanttCalendar()
          Default constructor
GanttCalendar(java.util.Date date)
           
GanttCalendar(GanttCalendar g)
          Copy constructor
GanttCalendar(int year, int month, int date)
          Constructor with a year, a month and a day
 
Method Summary
 void add(int dayNumber)
          Add a number of day to the current date
 GanttCalendar Clone()
          Return a clone of the calendar
 int compareTo(GanttCalendar when)
          This function compare two date
 int diff(GanttCalendar d)
          Return the difference (in day) between two date
 int getDate()
          Return the day
static java.lang.String getDateAndTime()
           
 int getDay()
          Return the day
 java.lang.String[] getDayMonthLanguage()
          Return an array with all name of month
 int getDayWeek()
          Return the number of the day on the week
 java.lang.String[] getDayWeekLanguage()
          Return an array with all name of day
 int getMonth()
          Return the month
 int getNumberOfDay()
          Cette fontion retourne le nombre de jour dans le moi.
 int getWeek()
          Return the numbner of the week on the year
 int getYear()
          Return the year
 void go(int field, int value)
          Change the value of a filed
 void goNextMonth()
          Change date to next month.
 void goPrevMonth()
          Change date to previous month.
 GanttCalendar newAdd(int dayNumber)
          Change the year of the date, and return a copy
static GanttCalendar parseXMLDate(java.lang.String s)
           
 void setDay(int d)
          Change the date of the date
 void setMonth(int m)
          Change the month of the date
 void setYear(int y)
          Change the year of the date
 java.lang.String toString()
          Return the date to A string
 java.lang.String toXMLString()
           
 
Methods inherited from class java.util.GregorianCalendar
add, computeFields, computeTime, equals, getActualMaximum, getActualMinimum, getGreatestMinimum, getGregorianChange, getLeastMaximum, getMaximum, getMinimum, hashCode, isLeapYear, roll, roll, setGregorianChange
 
Methods inherited from class java.util.Calendar
after, before, clear, clear, clone, complete, get, getAvailableLocales, getFirstDayOfWeek, getInstance, getInstance, getInstance, getInstance, getMinimalDaysInFirstWeek, getTime, getTimeInMillis, getTimeZone, internalGet, isLenient, isSet, set, set, set, set, setFirstDayOfWeek, setLenient, setMinimalDaysInFirstWeek, setTime, setTimeInMillis, setTimeZone
 
Methods inherited from class java.lang.Object
finalize, getClass, notify, notifyAll, wait, wait, wait
 

Constructor Detail

GanttCalendar

public GanttCalendar()
Default constructor


GanttCalendar

public GanttCalendar(int year,
                     int month,
                     int date)
Constructor with a year, a month and a day


GanttCalendar

public GanttCalendar(GanttCalendar g)
Copy constructor


GanttCalendar

public GanttCalendar(java.util.Date date)
Method Detail

parseXMLDate

public static GanttCalendar parseXMLDate(java.lang.String s)

Clone

public GanttCalendar Clone()
Return a clone of the calendar


toString

public java.lang.String toString()
Return the date to A string

Overrides:
toString in class java.util.Calendar

toXMLString

public java.lang.String toXMLString()

getYear

public int getYear()
Return the year


getMonth

public int getMonth()
Return the month


getDate

public int getDate()
Return the day


getDay

public int getDay()
Return the day


getDayWeek

public int getDayWeek()
Return the number of the day on the week


getWeek

public int getWeek()
Return the numbner of the week on the year


getDayMonthLanguage

public java.lang.String[] getDayMonthLanguage()
Return an array with all name of month


getDayWeekLanguage

public java.lang.String[] getDayWeekLanguage()
Return an array with all name of day


setYear

public void setYear(int y)
Change the year of the date


setMonth

public void setMonth(int m)
Change the month of the date


setDay

public void setDay(int d)
Change the date of the date


add

public void add(int dayNumber)
Add a number of day to the current date


newAdd

public GanttCalendar newAdd(int dayNumber)
Change the year of the date, and return a copy


diff

public int diff(GanttCalendar d)
Return the difference (in day) between two date


getNumberOfDay

public int getNumberOfDay()
Cette fontion retourne le nombre de jour dans le moi.


compareTo

public int compareTo(GanttCalendar when)
This function compare two date

Returns:
0 If the two date are equals

goNextMonth

public void goNextMonth()
Change date to next month.


goPrevMonth

public void goPrevMonth()
Change date to previous month.


go

public void go(int field,
               int value)
Change the value of a filed


getDateAndTime

public static java.lang.String getDateAndTime()


${copyright}