all projects
Full Stack2025

Date Calculator

Web application for calculating and tracking days across custom date ranges with configurable anchor periods.

date-calc.zisiskostakakis.com
Date Calculator screenshot

01 Overview

Date Calculator is a full-stack web application for calculating and tracking days across custom date ranges with configurable anchor periods. It was built for tracking travel days, residency requirements, and other counts measured against custom yearly periods.

The frontend is built with Next.js 15 and React 19. Users add date ranges with a calendar picker, configure custom anchor dates (e.g., September 17 to September 16), and overlapping ranges are merged automatically. A heatmap shows which days fall within each period.

The backend is a RESTful API built with Flask (Python) and deployed as a serverless AWS Lambda function using container images. The API handles complex date calculations, overlap merging, heatmap generation, and session management.

02 Key Features

Date range management with a calendar range picker
Custom anchor periods - configure any anchor date (month/day) to define custom yearly periods
Overlap merging - overlapping date ranges are merged before counting
Interactive heatmap showing which days fall within each period
Threshold validation - set minimum day requirements per period and get pass/fail indicators
Quick presets - today, last 7/30 days, current/last period
Persistent storage - save and load calculation sessions using localStorage
Responsive dark theme built with Tailwind CSS
Handles leap years, Feb 29, and invalid dates
Accurate period boundary calculations across year transitions

03 Architecture

System Architecture

The application is split into a statically-deployed Next.js frontend on Vercel and a serverless Flask API on AWS Lambda. The frontend calls the API via API Gateway; Lambda runs the Python calculation engine packaged as a Docker container image.

rendering diagram…

Date Calculation Pipeline

Each calculation request flows through overlap merging, period boundary splitting, and heatmap generation before results are returned to the client.

rendering diagram…

Frontend State Management

All UI state is managed with React hooks and persisted to localStorage so sessions survive page reloads. No external state library is used.

rendering diagram…