02/28/2005
 

com.epicentric.common
Class CalendarUtils

java.lang.Object
  |
  +--com.epicentric.common.CalendarUtils

Deprecated. as of 4.5, to be removed in 8.0 or later. No replacement.

public class CalendarUtils
extends Object

Utility class for formatting, representing, and returning calendar and date information.


Field Summary
protected static DateFormatSymbols dateSymbols
          Deprecated. Date symbols object for retrieving month and weekday strings.
protected static int[] DAYS_OF_MONTH
          Deprecated. Array storing the number of days of each month.
 
Constructor Summary
protected CalendarUtils()
          Deprecated. Private constructor of the class.
 
Method Summary
static int getCurrent(int field)
          Deprecated. Gets the value of the specified field for the current date, such as year, month, day of year, week of year, etc.
static String getDateString(int year, int month, int day)
          Deprecated. Returns the string for the specified date.
static String getDayOfWeekString(int year, int month, int day)
          Deprecated. Returns the string for the specified day of the week.
static String getFormattedDate(int year, int month, int day)
          Deprecated. Same as getDateString(), except formats the string as "MM/dd/yyyy".
static int[][] getMonthFormat(int year, int month)
          Deprecated. Returns a 2-dimensional array representing weeks and days of the specified month.
static String getMonthString(int month)
          Deprecated. Returns the string for the specified month.
static String getTodayString()
          Deprecated. Returns the string for the current date.
static void main(String[] args)
          Deprecated. Formats and prints a calendar for the specified year and month or for a whole year.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Field Detail

DAYS_OF_MONTH

protected static final int[] DAYS_OF_MONTH
Deprecated. 
Array storing the number of days of each month.

dateSymbols

protected static DateFormatSymbols dateSymbols
Deprecated. 
Date symbols object for retrieving month and weekday strings.
Constructor Detail

CalendarUtils

protected CalendarUtils()
Deprecated. 
Private constructor of the class. Should not be called.
Method Detail

getMonthFormat

public static int[][] getMonthFormat(int year,
                                     int month)
Deprecated. 
Returns a 2-dimensional array representing weeks and days of the specified month. Uses the java.util.GregorianCalendar class.
Parameters:
year - Year integer (yyyy format)
month - Integer representing the month of the year (0 is January)
Returns:
2-dimensional integer array, with the first dimension representing the week (or partial week) in month and the second dimension representing the day of the week. Each array element is a day of the month. An element value of -1 indicates each day in a partial week that is not part of the month (a partial week either begins in the previous month or ends in the next month). Returns null if month is out of range.

getMonthString

public static String getMonthString(int month)
Deprecated. 
Returns the string for the specified month. Uses the java.text.DateFormatSymbols class.
Parameters:
month - Integer representing the month of the year (0 is January)
Returns:
String corresponding to month

getDayOfWeekString

public static String getDayOfWeekString(int year,
                                        int month,
                                        int day)
Deprecated. 
Returns the string for the specified day of the week. Uses the java.util.GregorianCalendar and java.text.SimpleDateFormat classes.
Parameters:
year - Year integer (yyyy format)
month - Integer representing the month of the year (0 is January)
day - Integer representing the day of the month
Returns:
String corresponding to the day of the week for year, month, and day

getTodayString

public static String getTodayString()
Deprecated. 
Returns the string for the current date. Uses the java.text.SimpleDateFormat class.
Returns:
String corresponding to the current date in the format "Month dd, yyyy".

getDateString

public static String getDateString(int year,
                                   int month,
                                   int day)
Deprecated. 
Returns the string for the specified date. Uses the java.util.GregorianCalendar and java.text.SimpleDateFormat classes.
Parameters:
year - Year integer (yyyy format)
month - Integer representing the month of the year (0 is January)
day - Integer representing the day of the month
Returns:
String corresponding to the specified day in the format "Month dd, yyyy".

getFormattedDate

public static String getFormattedDate(int year,
                                      int month,
                                      int day)
Deprecated. 
Same as getDateString(), except formats the string as "MM/dd/yyyy".
See Also:
CalendarUtils.getDateString(int year, int month, int day)

getCurrent

public static int getCurrent(int field)
Deprecated. 
Gets the value of the specified field for the current date, such as year, month, day of year, week of year, etc. Uses the java.util.GregorianCalendar class.
Parameters:
field - GregorianCalendar field
Returns:
Integer representing the current value of field

main

public static void main(String[] args)
Deprecated. 
Formats and prints a calendar for the specified year and month or for a whole year. To use, call:
java com.epicentric.common.CalendarUtils YEAR {MONTH}
where:
YEAR is the year to display
MONTH is an optional parameter indicating the month to display

02/28/2005
 

Copyright and Trademark Notices