Setting Up Calendar

作者 gopigment6fec49f4ce9d無授權條款22 個星標收錄於 2026年10月8日更新於 2026年10月8日儲存庫2 天前更新

Execution skill. Use when configuring an application calendar — choosing calendar type, fiscal year, date range, and time dimensions.

僅含說明Business & Finance
AI 產生的概覽

設定 Pigment 應用程式行事曆:類型、會計年度起始月、日期範圍與時間維度。

功能
指導 Pigment 應用程式行事曆的設定,涵蓋行事曆類型(公曆或週曆)、會計年度起始月份、起訖日期,以及要啟用哪些時間維度。文件說明用來讀取、建立、擴充與調整行事曆的工具呼叫,以及在 Hub 應用程式中共用時間維度清單的方法。它也提供財務、營運與策略規劃的常見設定模式,並指出實際值與計畫的區分應由版本維度處理,而非行事曆。
適用情境
在建立 Pigment 應用程式之後、建立任何維度或量值之前,需要定義時間結構時使用。也適用於擴充日期範圍、變更粒度,或為財務與營運規劃選擇會計年度起始月。適用於需要共用行事曆時間維度的 Hub 應用程式。
執行需求
需要存取 Pigment 行事曆工具(calendar_get、calendar_create、calendar_expand、calendar_add_time_dimension、calendar_remove_time_dimension、update_list)以及目標應用程式的 UUID。不附帶指令碼,僅為說明性內容。

Setting Up Calendar

Every Pigment application has a Calendar defining the time structure. Configure it immediately after creating the application and before creating any dimension or metric.

Use tool:calendar_get to read the current configuration, tool:calendar_create to create a new calendar, tool:calendar_expand to extend the date range, tool:calendar_add_time_dimension and tool:calendar_remove_time_dimension to adjust granularity.

Creating a Calendar

Use tool:calendar_create with these parameters:

  • application_id (required): the target application UUID
  • start_date (required): e.g. "2020-01-01"
  • end_date (required): e.g. "2026-12-31"
  • selected_time_dimensions (required): list of time dimensions, e.g. ["Month", "Quarter", "Year"]
  • actual_vs_forecast_enabled (required): always set to false. See below.
  • gregorian_config.fiscal_year_starting_month (optional): 1-12, defaults to 1 (January)

actual_vs_forecast_enabled is not how you split actuals from plan, despite what the tool description suggests. It is legacy, and it gives one global switchover for the whole application: it cannot vary per planning cycle, so a Budget and a Forecast with different switchover dates cannot coexist. Pass false and model the split with a Version Dimension carrying a Switchover Month property plus Is_Actual / Is_Plan metrics — see skill:building-versions-and-planning-cycles.

Sharing Calendar Dimensions

tool:calendar_create produces Private time dimension lists (Month, Quarter, Year). For a Hub application where calendars must be shared:

  1. After creating the calendar, call tool:calendar_get to retrieve the time dimension list IDs.
  2. For each time dimension list, call tool:update_list with sharing_status: "Shared".

This is separate from tool:batch_share_blocks which is for metrics and other blocks.

Choose Calendar Type

TypePeriodsUse when
GregorianMonth-based (Jan–Dec)Standard financial planning, month/quarter/year reporting. Most common choice.
WeeklyWeek-basedOperations or retail planning requiring week-level cycles.

Gregorian supports all time dimensions: Day, Week, Month, Quarter, Half, Year. Weekly supports Week and Day only.

Set Fiscal Year Start (Gregorian Only)

The fiscal year starting month determines how Year, Quarter, and Half periods align.

  • January: Calendar-year companies (most common)
  • April: UK, Japan, many government entities
  • July: Australian companies
  • October: US Federal fiscal year

Impact:

  • TIMEDIM(..., 'Year') returns fiscal year items
  • YEARTODATE resets at fiscal year start
  • Quarter boundaries shift (Q1 starts at fiscal year month)

Example with April start: FY 2026 = April 2025 - March 2026; Q1 = Apr-Jun 2025.

Set the fiscal year start during initial setup. Changing it later affects existing formulas and YEARTODATE calculations.

Define the Date Range

  • Start date: 2-3 years before current year (historical data needs)
  • End date: 3-5 years after current year (planning horizon)

Common pattern: 3 years historical + 5 years forward = 8-year range.

Use tool:calendar_expand to extend the range later. Extending is safe; existing data is preserved. Shortening is not possible if data exists in those periods.

Select Time Dimensions

Include only the time dimensions you need. Each adds complexity and performance cost.

Default: enable Year, Quarter, and Month unless the user explicitly requests fewer. Quarter is essential for standard financial reporting and costs little in performance. Only omit Quarter if the user specifically says they do not need quarterly aggregation.

Standard Time Dimensions

DimensionGranularityInclude when
YearAnnualAlways for any planning application
HalfSemi-annualMid-year reporting, strategic reviews
QuarterQuarterlyEnable by default for any planning application
MonthMonthlyRequired for Gregorian calendars; standard for FP&A
WeekWeeklyOperations, retail, capacity planning
DayDailyDetailed operational analysis, daily transaction tracking

Extra Time Dimensions (Non-Hierarchical)

These repeat across years and enable pattern analysis:

DimensionItemsUse for
DayOfWeekMon–SunWeekday vs weekend patterns
MonthOfYearJan–DecSeasonal analysis across years
QuarterOfYearQ1–Q4Quarterly pattern comparison
WeekOfYearWeek 1–53Week-based pattern analysis
HalfOfYearH1, H2Semi-annual comparison

Time Hierarchy

Year → Half → Quarter → Month → Week → Day

Each level aggregates its children. This hierarchy powers CUMULATE, LAG, YEARTODATE, and TIMEDIM. Week may overlap month boundaries; Pigment handles this automatically.

Common Setup Patterns

  • Standard Financial Planning: Gregorian, fiscal year January (or match company), Year/Quarter/Month, 3yr historical + 5yr forward
  • Operations Planning: Gregorian or Weekly, Month/Week (or Week/Day), 1yr historical + 2yr forward, add DayOfWeek if needed
  • Strategic Planning: Gregorian, Year/Half/Quarter, 5yr historical + 10yr forward

Rules

  • Never recreate Month, Year, or any calendar dimension manually. Always use the built-in calendar.
  • Calendar properties are protected: do not edit or delete them.
  • Actuals vs Plan separation is handled by the Version Dimension (skill:building-versions-and-planning-cycles), not by the calendar.
  • If daily granularity is enabled, consider subsetting the calendar to the relevant date range for performance (skill:diagnosing-performance-issues).

來源與署名

來源:gopigment/ai-plugins位於skills/setting-up-calendar提交6fec49f

授權條款: 無授權條款

內容歸原作者所有。SourceWeft 從公開儲存庫中收錄這些內容。

檢舉或申請下架