Feature: Create a holiday program #6
Draft
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
This PR implements a new COBOL holiday calculator program that determines what day of the week holidays fall on for any given year, addressing the feature request for a historical holiday day calculator.
Overview
The new Holiday Calculator (
HOLIDAY-SIMPLE.cbl) is an interactive OpenCobol program that calculates the day of the week for major holidays across a wide historical range from 1806 to 3000, meeting the requirement for both historical and forward-looking date calculations.Features
FUNCTION INTEGER-OF-DATEandFUNCTION MODfor precise day-of-week calculationsExample Usage
Technical Implementation
The program leverages standard COBOL date processing capabilities:
FUNCTION INTEGER-OF-DATEFUNCTION MOD(date_integer, 7) + 1Testing Results
Verified accurate calculations for:
Files Added
OpenCobol/HOLIDAY-SIMPLE.cbl- Main holiday calculator program (143 lines)OpenCobol/HOLIDAY-README.md- Comprehensive documentation with usage examplesThe program compiles cleanly with GnuCOBOL 3.1.2.0 and follows the existing repository's COBOL coding style and structure. No external dependencies are required.
Warning
Firewall rules blocked me from connecting to one or more addresses (expand for details)
I tried to connect to the following addresses, but was blocked by firewall rules:
esm.ubuntu.com/usr/lib/apt/methods/https(dns block)If you need me to access, download, or install something from one of these locations, you can either:
Additional instructions:
Fixes #5
💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.