Calendar and Period Types

A calendar in Spectre represents a collection of period types. A calendar must include the year period type, and depending on the calendar, it might also specify other periods such as year-quarter, year-month, and year-week. The smaller periods are named after their elements. For instance, an example of a year-month period value might be February 2017, which has a year element and a month element.

Each period value in Spectre has a calendar and period type associated with it. For example, a period value representing the 15th week in ISO week year 2015 would have the calendar iso 8601 (referring to the ISO 8601 week-numbering system) and the period type year-week.

Spectre comes with some built-in calendars, but you can also add custom calendars. The built-in calendars are:

Built-in Calendar Description
Standard

This is the widely used Gregorian calendar, with 365 or 366 days, and 12 months per year. It supports the following period types:

year, year-half, year-quarter, year-tertile, year-month

ISO 8601

This is the ISO week-numbering system, with 364 or 371 days, and 52 or 53 weeks per year. It supports the following period types:

year, year-week

Offset <month-name>

This is a fiscal year similar to the standard calendar except starting on a different month. The <month-name> must be a full English month name. For example, "offset October" is a calendar beginning on October 1 and ending on September 30. The fiscal year number corresponds to the standard year in which the fiscal year ends. For instance, year 2017 in "offset October" ends on September 30, 2017. Offset calendars support the following period types:

year, year-half, year-quarter, year-tertile, year-month

NOTE: Calendar names are not case sensitive.

See also: