A multi-platform application that determines the day of the week for any given date using the Doomsday algorithm. The project includes implementations in Python (Flask web app), Java (Swing GUI), and C++ (console application).
This application calculates the day of the week for any date between 1600 and 2099 using mathematical algorithms based on month codes, century codes, and modular arithmetic. It also validates dates, identifies leap years, and optionally displays detailed calculation breakdowns.
- Calculate day of the week for dates from 1600 to 2099
- Automatic leap year detection and validation
- Date validation to prevent invalid entries
- Optional detailed calculation breakdown showing:
- Month codes
- Century codes
- Year remainders and quotients
- Step-by-step mathematical operations
- Three platform implementations for maximum accessibility
- Backend: Python 3.x with Flask framework
- Frontend: HTML5, CSS3 with responsive design
- Styling: Custom gradient design with animations
- Fonts: Google Fonts (Poppins)
- Icons: Font Awesome 6.4.0
- Framework: Java Swing
- GUI Components: JFrame, JTextField, JTextArea, JButton
- Event Handling: ActionListener interface
- Language: C++ with OOP principles
- Design Pattern: Multi-level inheritance hierarchy
- Features: Friend functions, operator overloading, static members
project/
├── app.py # Flask web application
├── templates/
│ └── index.html # Web interface with CSS styling
├── DayFinderApp.java # Java Swing GUI application
├── Calender.cpp # C++ console application
└── README.md # This file
- Install dependencies:
pip install flask- Run the application:
python app.py- Open browser and navigate to
http://127.0.0.1:5000/
- Compile:
javac DayFinderApp.java- Run:
java DayFinderApp- Compile:
g++ Calender.cpp -o calendar- Run:
./calendarThe application uses a mathematical formula based on the Doomsday algorithm:
Day of Week = (Date + Month Code + Year + Year/4 + Century Code) % 7
-
Month Codes: Each month has a predefined code (Jan=0, Feb=3, Mar=3, etc.)
-
Year: Last two digits of the year
-
Year/4: Integer division of last two digits by 4
-
Century Codes:
- 1600-1699: 6
- 1700-1799: 4
- 1800-1899: 2
- 1900-1999: 0
- 2000-2099: 6
-
Result: Remainder when divided by 7 gives day (0=Sunday, 1=Monday, etc.)
- Date range: 1-31 (validated against month and leap year)
- Month range: 1-12
- Year range: 1600-2099
- Leap year calculation: Accounts for century rules (divisible by 400 or by 4 but not 100)
- Responsive layout for mobile and desktop
- Animated gradient background
- Glassmorphism UI with backdrop blur
- Smooth transitions and hover effects
- Accessibility features (ARIA labels, keyboard navigation)
- Interactive checkbox for showing calculation details
- Algorithm complexity: O(1) constant time
- Date validation: O(1) constant time
- Supports 500 years of dates (1600-2099)
- Web app response time: <100ms
- Zero external API dependencies for calculations
Web application deployed at: https://rama082005.pythonanywhere.com/
- Extend year range beyond 2099
- Add support for different calendar systems
- Implement date range calculations
- Add historical date events lookup
- Multi-language support
- REST API endpoints for programmatic access
This project is available for educational and personal use.
Created as a demonstration of multi-platform development and algorithmic problem-solving.