    import {Info} from 'luxon/src/info.js'

public class | source

# Info

The Info class contains static methods for retrieving general time and date related data. For example, it has methods for finding out if a time zone has a DST, for listing the months in any supported locale, and for discovering which of Luxon features are available in the current environment.

## Static Method Summary

Static Public Methods
public static | eras(length: string, opts: object): [string] Return an array of eras, such as ['BC', 'AD']. |
public static | features(): object Return the set of available features in this environment. |
public static | hasDST(zone: string | Zone): boolean Return whether the specified zone contains a DST. |
public static | meridiems(opts: object): [string] Return an array of meridiems. |
public static | months(length: string, opts: object): [string] Return an array of standalone month names. |
public static | monthsFormat(length: string, opts: object): [string] Return an array of format month names. |
public static | weekdays(length: string, opts: object): [string] Return an array of standalone week names. |
public static | weekdaysFormat(length: string, opts: object): [string] Return an array of format week names. |

## Static Public Methods

### public static eras(length: string, opts: object): [string] source

Return an array of eras, such as ['BC', 'AD']. The locale can be specified, but the calendar system is always Gregorian.

#### Params:

Name | Type | Attribute | Description
length | string | optional default: 'short' | the length of the era representation, such as "short" or "long".
opts | object |  | options
opts.locale | string | optional default: 'en' | the locale code

#### Return:

[string]

#### Example:

    Info.eras() //=> [ 'BC', 'AD' ]

    Info.eras('long') //=> [ 'Before Christ', 'Anno Domini' ]

    Info.eras('long', 'fr') //=> [ 'avant Jésus-Christ', 'après Jésus-Christ' ]

### public static features(): object source

Return the set of available features in this environment. Some features of Luxon are not available in all environments. For example, on older browsers, timezone support is not available. Use this function to figure out if that's the case. Keys:

- `timezones`: whether this environment supports IANA timezones
- `intlTokens`: whether this environment supports internationalized token-based formatting/parsing
- `intl`: whether this environment supports general internationalization

#### Return:

object

#### Example:

    Info.feature() //=> { intl: true, intlTokens: false, timezones: true }

### public static hasDST(zone: string | Zone): boolean source

Return whether the specified zone contains a DST.

#### Params:

Name | Type | Attribute | Description
zone | string | Zone | optional default: 'local' | Zone to check. Defaults to the environment's local zone.

#### Return:

boolean

### public static meridiems(opts: object): [string] source

Return an array of meridiems.

#### Params:

Name | Type | Attribute | Description
opts | object |  | options
opts.locale | string | optional default: 'en' | the locale code

#### Return:

[string]

#### Example:

    Info.meridiems() //=> [ 'AM', 'PM' ]

    Info.meridiems('de') //=> [ 'vorm.', 'nachm.' ]

### public static months(length: string, opts: object): [string] source

Return an array of standalone month names.

#### Params:

Name | Type | Attribute | Description
length | string | optional default: 'long' | the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
opts | object |  | options
opts.locale | string | optional default: 'en' | the locale code
opts.numberingSystem | string | optional default: null | the numbering system
opts.outputCalendar | string | optional default: 'gregory' | the calendar

#### Return:

[string]

#### Example:

    Info.months()[0] //=> 'January'

    Info.months('short')[0] //=> 'Jan'

    Info.months('numeric')[0] //=> '1'

    Info.months('short', { locale: 'fr-CA' } )[0] //=> 'janv.'

    Info.months('numeric', { locale: 'ar' })[0] //=> '١'

    Info.months('long', { outputCalendar: 'islamic' })[0] //=> 'Rabiʻ I'

#### See:

- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat

### public static monthsFormat(length: string, opts: object): [string] source

Return an array of format month names. Format months differ from standalone months in that they're meant to appear next to the day of the month. In some languages, that changes the string. See months

#### Params:

Name | Type | Attribute | Description
length | string | optional default: 'long' | the length of the month representation, such as "numeric", "2-digit", "narrow", "short", "long"
opts | object |  | options
opts.locale | string | optional default: 'en' | the locale code
opts.numbering | string | optional default: null | the numbering system
opts.outputCalendar | string | optional default: 'gregory' | the calendar

#### Return:

[string]

### public static weekdays(length: string, opts: object): [string] source

Return an array of standalone week names.

#### Params:

Name | Type | Attribute | Description
length | string | optional default: 'long' | the length of the month representation, such as "narrow", "short", "long".
opts | object |  | options
opts.locale | string | optional default: 'en' | the locale code
opts.numbering | string | optional default: null | the numbering system
opts.outputCalendar | string | optional default: 'gregory' | the calendar

#### Return:

[string]

#### Example:

    Info.weekdays()[0] //=> 'Monday'

    Info.weekdays('short')[0] //=> 'Mon'

    Info.weekdays('short', 'fr-CA')[0] //=> 'lun.'

    Info.weekdays('short', 'ar')[0] //=> 'الاثنين'

#### See:

- https://developer.mozilla.org/en-US/docs/Web/JavaScript/Reference/Global_Objects/DateTimeFormat

### public static weekdaysFormat(length: string, opts: object): [string] source

Return an array of format week names. Format weekdays differ from standalone weekdays in that they're meant to appear next to more date information. In some languages, that changes the string. See weekdays

#### Params:

Name | Type | Attribute | Description
length | string | optional default: 'long' | the length of the month representation, such as "narrow", "short", "long".
opts | object |  | options
opts.locale | string | optional default: 'en' | the locale code
opts.numbering | string | optional default: null | the numbering system
opts.outputCalendar | string | optional default: 'gregory' | the calendar

#### Return:

[string]