Annual Calendar Generation and Validation from Public Holiday Notices
Learn how to turn a public holiday notice into a validated annual spreadsheet calendar using structured data, deterministic date rules, and AI-assisted extraction. This article covers source verification, holiday and make-up workday handling, workbook design, cross-checks, and internal communications, without assuming any unverified 2027 holiday arrangements.
1. Treat Calendar Generation as a Data Engineering Task
Creating a full-year spreadsheet calendar for 2027 from a public notice may look like a simple exercise in filling date cells and applying colors. In practice, it involves information extraction, rule-based calculations, layout design, and document generation.
The task typically has four deliverables:
- An annual calendar based on a standard Monday–Friday workweek.
- Distinct color markings for holiday days off and make-up workdays.
- A summary of holidays and make-up workdays.
- A short internal company notice.
Make-up workdays are dates designated as working days to offset time off elsewhere in the holiday schedule. They may fall on weekends, overriding the standard workweek.
All four deliverables should use the same date dataset. Generating them independently can produce inconsistencies—for example, a make-up workday marked in the calendar but missing from the summary.
A more reliable workflow is:
Parse the notice → Confirm the data → Calculate date statuses → Generate the workbook → Cross-validate → Generate the internal notice
A language model can help interpret the notice and draft explanatory text. Date arithmetic, status classification, and completeness checks should rely on deterministic rules wherever possible.
Important limitation: No specific 2027 holiday notice was supplied with the source material. This article therefore describes a generation method and acceptance criteria, not confirmed holiday or make-up workday arrangements for 2027.
2. Verify the Input Before Treating It as an Official Schedule
Check the Source and Scope
Before generating the calendar, confirm that the input includes the complete notice, issuing authority, publication date, applicable year, and relevant explanatory notes. If these are missing, mark the task as awaiting additional information. Do not infer the current year’s schedule from previous years.
A public holiday notice is also not necessarily a complete company attendance policy. Shift work, on-call duties, regional differences, or special business arrangements may require separate treatment.
The output should explicitly state that it assumes a standard Monday–Friday workweek with Saturdays and Sundays off. It should not imply that the calendar applies to every role.
The source notes should include at least:
- Notice title and issuing authority.
- Publication date and applicable year.
- How the input material was obtained.
- Data preparation date and version.
- Items that remain unconfirmed.
- A statement that the output is an example compiled from the supplied public notice.
Use “Pending confirmation” for information not provided in the source. Do not fill in missing details without evidence.
Separate Three Types of Information
When processing the notice, distinguish between three categories.
Source facts are explicitly stated in the notice, including holiday names, date ranges for days off, and designated make-up workdays.
Computable information includes the weekday of a date, the number of days in a month, and the number of calendar days in an interval. Date algorithms can calculate these reliably.
Company policy decisions include staffing assignments, payroll treatment, and leave approval procedures. A public holiday notice usually does not determine these matters, and the generation system should not invent them.
This separation defines the boundaries of automation and keeps the calendar, summary, and internal notice within the available evidence.
3. Build a Shared Holiday Data Model
Convert the Notice into Structured Records
Do not move directly from the source text to a color-coded spreadsheet. First create an intermediate data layer: record each holiday, then expand its dates into daily statuses.
A holiday record should contain the following fields:
| Field | Meaning | Handling rule |
|---|---|---|
| Holiday name | The name used in the notice | Preserve its meaning without expanding it |
| Start date | First date of the time-off interval | Use a complete year-month-day value |
| End date | Last date of the time-off interval | Treat the end date as inclusive |
| Make-up workday set | Working dates listed in the notice | Store separately from time-off intervals |
| Source reference | Relevant paragraph or source excerpt | Support manual review |
| Confirmation status | Confirmed or pending confirmation | Do not publish uncertain records as confirmed |
If a holiday includes multiple noncontiguous time-off intervals, the model should support multiple intervals. Combining them into one continuous range could incorrectly include dates that are supposed to remain working days.
Expand Records into Daily Data
Workbook generation should use a daily dataset. Each date should include at least:
- Date.
- Day of the week.
- Month.
- Baseline status.
- Notice override status.
- Final status.
- Associated holiday.
- Source record.
- Notes.
The baseline follows the standard workweek: Monday through Friday are working days, while Saturday and Sunday are weekend days off.
The notice override records holiday and make-up workday arrangements. Keeping the baseline and override separate makes it possible to explain why a date differs from the ordinary weekly schedule.
4. Apply Explicit Rules for Holidays and Make-Up Workdays
Detect Conflicts Before Assigning Final Status
One common error is to mark every weekend as a day off, ignoring a weekend designated as a make-up workday. Another is to mark only weekdays within a holiday interval, leaving its weekend dates unmarked.
Use this processing order:
- Check whether any date belongs to both the time-off set and the make-up workday set.
- If a conflict exists, stop publication and request review.
- For conflict-free data, apply the explicit arrangements in the notice.
- Apply the standard workweek only to dates not covered by the notice.
The logic can be expressed as follows:
For each date in the year:If the date belongs to both the time-off set and the make-up workday set:Record the conflict and stop publicationElse if the date belongs to the make-up workday set:Final status = Make-up workdayElse if the date belongs to the time-off set:Final status = Notice-designated day offElse if the date is Saturday or Sunday:Final status = Regular weekendElse:Final status = Regular workday
Do not assume that all make-up workdays fall on weekends. Check their weekdays and flag records that differ from the task’s expectations, but do not delete an explicitly sourced date merely because it is unusual.
Distinguish Time-Off Duration from Changes in Working Days
“Days off” in a holiday summary usually means the number of calendar days in the time-off interval. It does not necessarily mean additional nonworking days or the reduction in working days.
A holiday interval may include weekends that were already nonworking days under the baseline schedule. Make-up workdays can then increase the actual number of working days elsewhere.
If working-day changes need to be reported, calculate them from the final daily statuses relative to the baseline. Do not simply subtract make-up workdays from the holiday interval’s calendar-day count.
For holidays spanning two years, distinguish between:
- The calendar-day count for the complete holiday interval.
- The number of time-off dates within the calendar year being generated.
The annual calendar contains only dates within its year. The summary can retain the full interval, provided it clearly states the counting basis.
5. Design a Clear, Reusable Workbook
Organize the Workbook into Four Layers
The following worksheets balance readability with auditability.
Annual overview: A twelve-month calendar layout for quickly reviewing the year.
Monthly detail: Full dates, weekdays, final statuses, holiday names, and notes, organized by month for filtering and checking.
Holiday and make-up workday summary: Holiday names, time-off intervals, calendar-day counts, make-up workday dates and weekdays, and source notes.
Data and rules: Structured records, source information, version notes, and status-classification rules.
The overview prioritizes readability, while the detail worksheet prioritizes calculation and inspection. Both should be generated from the same data rather than maintained manually as separate documents.
Give Colors Unambiguous Meanings
Use one fill color for notice-designated days off and a clearly different color for make-up workdays. Regular weekends can use a lighter supporting style, while regular workdays retain the default background.
Color must not be the only way to communicate status. Special dates should also carry labels such as “Day off” or “Make-up workday,” and each relevant worksheet should include a legend.
This keeps the calendar understandable in grayscale printouts and for readers who cannot easily distinguish the colors.
Make sure the make-up workday style is not overridden by ordinary weekend formatting. Whether using directly assigned styles or conditional formatting, define the rule order and inspect the final appearance after export.
Include Monthly Annotations
Each month should list the holidays that affect it. A holiday spanning multiple months should be noted in every affected month, not only the month in which it starts.
For months without confirmed holiday records, wording depends on source completeness:
- If the source is complete and verified: “No holidays listed in the notice for this month.”
- If the source is incomplete: “This month’s arrangements are pending verification.”
These statements are not interchangeable.
6. Use the Summary as a Second Validation Layer
The summary is more than an attachment for readers. It is also a tool for checking the calendar.
Give each holiday its own row and list make-up workdays individually. Avoid vague descriptions such as “several days.”
After generation, perform checks in both directions:
- Every time-off date in the summary must appear in the calendar as a notice-designated day off.
- Every make-up workday in the summary must appear in the calendar as a make-up workday.
- Every special status in the calendar must trace back to a source record.
- Holiday names and date ranges must agree across all worksheets.
- All statistics must be calculated from date sets, not copied from independently generated prose.
Calculate total time-off dates from a deduplicated set. If two records include the same date, adding their counts directly can overstate the total. Retain overlap detection as part of validation.
7. Validate Both the Data and the Deliverable
Check Full-Year Completeness
The year 2027 is a common year with 365 days. Validate the number of daily records, date uniqueness, month assignment, and continuity.
Basic acceptance criteria include:
- The date range runs from January 1 through December 31, 2027.
- No dates are missing or duplicated.
- Each calculated weekday matches its date.
- Each month contains the correct number of days.
- The four final statuses are mutually exclusive and cover every date.
- Counts of regular workdays, regular weekends, notice-designated days off, and make-up workdays sum to 365.
These checks do not depend on the specific holiday arrangements and can be completed before importing the notice data.
Check the Workbook File
Correct data does not guarantee a usable workbook. Also verify that:
- The file opens normally.
- Text is not clipped.
- Print pagination is reasonable.
- Legends remain visible.
- Date cells store sortable date values.
The annual overview and monthly detail sheets can use different print settings. There is no need to compress every worksheet onto a single page.
Before distribution, inspect the workbook in its intended viewing environment. Sample at least one ordinary month, one month containing holiday arrangements, and one month containing make-up workdays.
Preserve Traceability
Record the data version, generation time, and validation results for every generated workbook.
When the source notice changes, compare the data differences first, then regenerate all related worksheets and the internal notice. Editing only a few colored cells can leave summary statistics or explanatory text out of sync.
8. Generate a Short Internal Notice from Verified Data
The purpose of the internal notice is to explain the attachment and its limits—not to republish an unverified holiday schedule.
The original deliverable specifies a notice of no more than 300 Chinese characters. For an English version, preserve the same concise scope and clear qualification.
If the source notice has not yet been supplied, prepare a template rather than presenting the text as a verified formal announcement.
For example:
Colleagues: The attached 2027 calendar and holiday/make-up workday summary are an example compiled from the supplied public notice, assuming a standard Monday–Friday workweek. Days off and make-up workdays use distinct colors and text labels. Before use, verify the source, version, and dates. Actual implementation is subject to the applicable official arrangements and company confirmation. Shift and on-call roles will be handled separately.
The example explicitly identifies the attachment as illustrative. If specific dates are included in a final notice, retrieve them from the verified data layer rather than asking the text-generation step to calculate them again.
9. Divide Responsibilities Between AI and Deterministic Code
AI-assisted generation is well suited to:
- Identifying relevant notice paragraphs.
- Extracting candidate fields.
- Flagging ambiguity.
- Drafting short explanations.
Deterministic programs are better suited to:
- Expanding date intervals.
- Calculating weekdays.
- Detecting conflicts.
- Producing summary statistics.
- Rendering the workbook.
Even when the prompt, data, and model conditions are the same, identical settings alone do not guarantee identical results. Acceptance testing should compare structured date sets, final statuses, and validation reports—not merely spreadsheet appearance or wording.
A trustworthy annual calendar closes the entire loop: source facts are verifiable, date statuses are explainable, workbook content is traceable, summaries support cross-checking, and internal communications clearly state their intended use and limits.
With those safeguards in place, automated generation can reduce manual preparation effort without shifting the verification burden onto the people who use the calendar.
