# Class: Calendar

## jala.Date.Calendar(collection)

This class represents a calendar based based on a grouped collection of HopObjects. It provides several methods for rendering the calendar plus defining locale and timezone settings.

## Constructor

#### new Calendar(collection)

Creates a new instance of jala.Data.Calendar

##### Parameters:

Name | Type | Description
--- | --- | ---
`collection` | HopObject | A grouped HopObject collection to work on

Source:
  - jala/code/Date.js, line 155

##### Returns:

A newly created jala.Date.Calendar instance

### Classes

Renderer

### Methods

#### getAccessNameFormat()

Returns the format of the access name used by this calendar to access child group objects of the collection this calendar is operating on. The default format is "yyyyMMdd".

Source:
  - jala/code/Date.js, line 281
See:
  - #setAccessNameFormat

##### Returns:

The date formatting pattern used to access child objects

#### getCalendar()

Returns a rendered calendar

Source:
  - jala/code/Date.js, line 402
See:
  - #renderCalendar

#### getCollection()

Returns the collection this calendar object works on

Source:
  - jala/code/Date.js, line 167

##### Returns:

The HopObject collection of this calendar

#### getHrefFormat()

Returns the date formatting pattern used to render hrefs. The default format is "yyyyMMdd".

Source:
  - jala/code/Date.js, line 257
See:
  - #setHrefFormat

##### Returns:

The date formatting pattern

#### getLocale()

Returns the locale used within this calendar instance. By default the locale used by this calendar is the default locale of the Java Virtual Machine running Helma.

Source:
  - jala/code/Date.js, line 212
See:
  - #setLocale

##### Returns:

The locale of this calendar

#### getRenderer()

Returns the renderer used by this calendar.

Source:
  - jala/code/Date.js, line 187
See:
  - #setRenderer

##### Returns:

The calendar renderer

#### getTimeZone()

Returns the locale used within this calendar instance. By default the timezone used by this calendar is the default timezone of the Java Virtual Machine running Helma.

Source:
  - jala/code/Date.js, line 234
See:
  - #setTimeZone

##### Returns:

The locale of this calendar

#### render()

Renders the calendar using either a custom renderer defined using #setRenderer or the default one.

Source:
  - jala/code/Date.js, line 299
See:
  - #setRenderer
  - jala.Date.Calendar.Renderer

#### setAccessNameFormat(fmt)

Sets the format of the group name to use when trying to access child objects of the collection this calendar is operating on.

##### Parameters:

Name | Type | Description
--- | --- | ---
`fmt` | String | The date format pattern to use for accessing child objects

Source:
  - jala/code/Date.js, line 268
See:
  - #getAccessNameFormat

#### setHrefFormat(fmt)

Sets the format of the hrefs to render by this calendar to the format pattern passed as argument.

##### Parameters:

Name | Type | Description
--- | --- | ---
`fmt` | String | The date format pattern to use for rendering the href

Source:
  - jala/code/Date.js, line 245
See:
  - #getHrefFormat

#### setLocale(loc)

Sets the locale to use within this calendar object

##### Parameters:

Name | Type | Description
--- | --- | ---
`loc` | java.util.Locale | The locale to use

Source:
  - jala/code/Date.js, line 199
See:
  - #getLocale

#### setRenderer(r)

Sets the renderer to use.

##### Parameters:

Name | Type | Description
--- | --- | ---
`r` | Object | The renderer to use

Source:
  - jala/code/Date.js, line 176
See:
  - #getRenderer

#### setTimeZone(loc)

Sets the locale to use within this calendar object

##### Parameters:

Name | Type | Description
--- | --- | ---
`loc` | java.util.Locale | The locale to use

Source:
  - jala/code/Date.js, line 221
See:
  - #getTimeZone