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

## com.google.gwt.user.datepicker.client
Class CalendarUtil

    java.lang.Object
      com.google.gwt.user.datepicker.client.CalendarUtil

    public class CalendarUtil

extends java.lang.Object

Useful utilities for creating views of a calendar.

Constructor Summary
`CalendarUtil()`

Method Summary
`static void` | `addDaysToDate(java.util.Date date, int days)` Adds the given number of days to a date.
`static void` | `addMonthsToDate(java.util.Date date, int months)` Adds the given number of months to a date.
`static java.util.Date` | `copyDate(java.util.Date date)` Copies a date.
`static int` | `getDaysBetween(java.util.Date start, java.util.Date finish)` Returns the number of days between the two dates.
`static int` | `getStartingDayOfWeek()` Returns the day of the week on which week starts in the current locale.
`static void` | `setToFirstDayOfMonth(java.util.Date date)` Sets a date object to be at the beginning of the month and no time specified.

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

Constructor Detail

### CalendarUtil

    public CalendarUtil()

Method Detail

### addDaysToDate

    public static void addDaysToDate(java.util.Date date,
                                     int days)

  Adds the given number of days to a date.

  Parameters:
    `date` - the date
    `days` - number of days

### addMonthsToDate

    public static void addMonthsToDate(java.util.Date date,
                                       int months)

  Adds the given number of months to a date.

  Parameters:
    `date` - the date
    `months` - number of months

### copyDate

    public static java.util.Date copyDate(java.util.Date date)

  Copies a date.

  Parameters:
    `date` - the date
  Returns:
    the copy

### getDaysBetween

    public static int getDaysBetween(java.util.Date start,
                                     java.util.Date finish)

  Returns the number of days between the two dates. Time is ignored.

  Parameters:
    `start` - starting date
    `finish` - ending date
  Returns:
    the different

### getStartingDayOfWeek

    public static int getStartingDayOfWeek()

  Returns the day of the week on which week starts in the current locale. The range between 0 for Sunday and 6 for Saturday.

  Returns:
    the day of the week

### setToFirstDayOfMonth

    public static void setToFirstDayOfMonth(java.util.Date date)

  Sets a date object to be at the beginning of the month and no time specified.

  Parameters:
    `date` - the date

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