Calendar Day Gap

Asked at Optiver · Coding Questions · Difficulty: Easy · Last asked Jul 15, 2026

Given two calendar dates, compute how many days lie between them. Dates follow the Gregorian calendar, so you must handle months of different lengths and leap years.

Loading the problem…