Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

## portlets.compoze.groupware.util
Class CalendarUtility

    java.lang.Object
      portlets.compoze.groupware.util.CalendarUtility

All Implemented Interfaces:
  java.io.Serializable

public class CalendarUtility
extends java.lang.Object
implements java.io.Serializable

This class provides utility classes for calendar.

See Also:
  Serialized Form

Nested Class Summary
`static class` | `CalendarUtility.IntStringPair` This class holds an integer key and a String value, and is used to return the results of enumerating the days and months.

Constructor Summary
`CalendarUtility()`

Method Summary
`static java.util.TimeZone[]` | `getCommonTimeZones()` Gets an array of common time zones.
`static java.lang.String` | `getMonthByNumber(int iMonth, int iFieldWidth, java.util.Calendar cal, java.util.Locale locale)` Gets the localized string for a month.
`static java.lang.String` | `getMonthByNumber(int iMonth, int iFieldWidth, java.util.Locale locale)` Gets the localized string for a month.
`static java.lang.String` | `getMonthByNumber(int iMonth, java.util.Locale locale)` Gets the localized string for a month.
`static java.util.Collection` | `getMonths(int iFieldWidth, java.util.Calendar cal, java.util.Locale locale)` Returns a collection of IntStringPair objects representing the months.
`static java.util.Collection` | `getMonths(int iFieldWidth, java.util.Locale locale)` Returns a collection of IntStringPair objects representing the months.
`static java.util.Collection` | `getMonths(java.util.Locale locale)` Returns a collection of IntStringPair objects representing the months.
`static java.util.TimeZone` | `getSubstituteTimeZone(java.util.TimeZone originalTimeZone)` Gets the substitute timezone for the original timezone.
`static java.lang.String` | `getTimeZoneGMT(java.util.TimeZone timeZone, java.util.Locale locale)` Gets the GMT component of the time zone.

Methods inherited from class java.lang.Object
`clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait`

Constructor Detail

### CalendarUtility

    public CalendarUtility()

Method Detail

### getCommonTimeZones

    public static java.util.TimeZone[] getCommonTimeZones()

  Gets an array of common time zones.

  Returns:
    an array of common time zones

### getMonths

    public static java.util.Collection getMonths(java.util.Locale locale)

  Returns a collection of IntStringPair objects representing the months. The key is the month number and the value of the month String.

  Parameters:
    `locale` - the locale to use
  Returns:
    collection of IntStringPair objects representing the months

### getMonths

    public static java.util.Collection getMonths(int iFieldWidth,
                                                 java.util.Locale locale)

  Returns a collection of IntStringPair objects representing the months. The key is the month number and the value of the month String.

  Parameters:
    `iFieldWidth` - width of month field
    `locale` - the locale to use
  Returns:
    collection of IntStringPair objects representing the months

### getMonths

    public static java.util.Collection getMonths(int iFieldWidth,
                                                 java.util.Calendar cal,
                                                 java.util.Locale locale)

  Returns a collection of IntStringPair objects representing the months. The key is the month number and the value of the month String.

  Parameters:
    `iFieldWidth` - width of month field
    `cal` - the calendar to use
    `locale` - the locale to use
  Returns:
    collection of IntStringPair objects representing the months

### getMonthByNumber

    public static java.lang.String getMonthByNumber(int iMonth,
                                                    java.util.Locale locale)

  Gets the localized string for a month.

  Parameters:
    `iMonth` - month number (0=Jan)
    `locale` - locale to use
  Returns:
    localized string for a month

### getMonthByNumber

    public static java.lang.String getMonthByNumber(int iMonth,
                                                    int iFieldWidth,
                                                    java.util.Locale locale)

  Gets the localized string for a month.

  Parameters:
    `iMonth` - month number (0=Jan)
    `iFieldWidth` - width of month field
    `locale` - locale to use
  Returns:
    localized string for a month

### getMonthByNumber

    public static java.lang.String getMonthByNumber(int iMonth,
                                                    int iFieldWidth,
                                                    java.util.Calendar cal,
                                                    java.util.Locale locale)

  Gets the localized string for a month.

  Parameters:
    `iMonth` - month number (0=Jan)
    `iFieldWidth` - width of month field
    `cal` - calendar to use
    `locale` - locale to use
  Returns:
    localized string for a month

### getTimeZoneGMT

    public static java.lang.String getTimeZoneGMT(java.util.TimeZone timeZone,
                                                  java.util.Locale locale)

  Gets the GMT component of the time zone.

  Parameters:
    `timeZone` - the timeZone
    `locale` - the locale
  Returns:
    the GMT component of the time zone or an empty string

### getSubstituteTimeZone

    public static java.util.TimeZone getSubstituteTimeZone(java.util.TimeZone originalTimeZone)

  Gets the substitute timezone for the original timezone.

  Parameters:
    `originalTimeZone` - the original timezone (`may not be null`)
  Returns:
    the substitute timezone

Overview | Package | Class | Tree | Deprecated | Index | Help
| Compoze Software, Inc.
PREV CLASS NEXT CLASS | FRAMES NO FRAMES
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD

Copyright ©1999-2003 Compoze Software, Inc. All rights reserved.