hoplugins.commons.utils
Class HTCalendar

java.lang.Object
  extended byhoplugins.commons.utils.HTCalendar

public class HTCalendar
extends java.lang.Object

HTCalendar is a class for calculating the Hattrick season and week number for a given date. Dates before October 15, 2000 can not be calculated using this calendar and will return both 0 for season and week.
Note:
October 15, 2000 was the start of Swedish season 11 and the first season for the first non-Swedish leagues that were created, namely:

Author:
Boy van der Werf

Method Summary
 int getHTSeason()
          Gets the calculated Hattrick season or 0 if the date is before the league's first season.
 int getHTWeek()
          Gets the calculated Hattrick week.
 java.util.Date getTime()
          Gets the date for which the Hattrick season and week is calculated.
 void setTime(java.util.Calendar cal)
          Sets the date for which to calculate the Hattrick season and week.
 void setTime(java.util.Date time)
          Sets the date for which to calculate the Hattrick season and week.
 void setTime(java.sql.Timestamp time)
          Sets the date for which to calculate the Hattrick season and week.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Method Detail

getHTSeason

public final int getHTSeason()
Gets the calculated Hattrick season or 0 if the date is before the league's first season.

Returns:
The calculated Hattrick season.

getHTWeek

public final int getHTWeek()
Gets the calculated Hattrick week. or 0 if the date is before the league's first season.

Returns:
The calculated Hattrick week.

setTime

public final void setTime(java.sql.Timestamp time)
Sets the date for which to calculate the Hattrick season and week.

Parameters:
time - Date for which to calculate the Hattrick season and week.

setTime

public final void setTime(java.util.Date time)
Sets the date for which to calculate the Hattrick season and week.

Parameters:
time - Date for which to calculate the Hattrick season and week.

setTime

public final void setTime(java.util.Calendar cal)
Sets the date for which to calculate the Hattrick season and week.

Parameters:
cal - Date for which to calculate the Hattrick season and week.

getTime

public final java.util.Date getTime()
Gets the date for which the Hattrick season and week is calculated.

Returns:
Date for which the Hattrick season and week is calculated.


Copyright © 2005 Hattrick Organizer Plugins Project. All Rights Reserved.