This "civic vs proleptic" split is a good use case for composite calendars: glue a few calendars together at their historical cut-over dates and the result behaves like one ordinary calendar.
I maintain an Elixir library (Calendrical) that does this. England, for example, is just three segments spliced onto a Julian base:
defmodule England do
use Calendrical.Composite,
calendars: [
~D[1155-03-25 Calendrical.Julian.March25], # year starts on Lady Day
~D[1751-03-25 Calendrical.Julian.Jan1], # New Year moved to Jan 1
~D[1752-09-14 Calendrical.Gregorian] # the 11-day jump
],
base_calendar: Calendrical.Julian
end
The "missing" days simply aren't valid dates, and stepping across the boundary jumps:
This "civic vs proleptic" split is a good use case for composite calendars: glue a few calendars together at their historical cut-over dates and the result behaves like one ordinary calendar.
I maintain an Elixir library (Calendrical) that does this. England, for example, is just three segments spliced onto a Julian base:
The "missing" days simply aren't valid dates, and stepping across the boundary jumps: