Choosing a Calendar
To assign a calendar and period type to a column in a Spectre Build script, use the following syntax:
type="period" calendar=<calendar> period-type=<period type>
For example:
text-input "data.txt" {
column "Quarter" type="period" calendar="standard" period-type="year-quarter"
column "Fiscal Month" type="period" calendar="offset August" period-type="year-month"
}
To assign a calendar to a period generated from a date in an expression, use the following syntax in a cPlan:
`period(<calendar>, <period type>, <date>)`
For example:
calc "Quarter" `period("standard", "year-quarter", value("Date"))`
calc "Fiscal Month" `period("offset August", "year-month", value("Date"))`
To add columns in a Spectre Build that refer to declared calendars, use the following syntax:
`period(<calendar>, <period type>, <date>)`
For example, the calendar declaration:
calendar "Fiscal" type="offset july"
The add operation:
add "FiscalYearMo" `period("Fiscal", "year-month", value("Date"))`
See also: