>A Date object can be created with an optional argument, the day of calendar reform as a Julian day number, which should be 2298874 to 2426355 or negative/positive infinity. The default value is Date::ITALY (2299161=1582-10-15).
There is an additional wrinkle to comment on, which is that not every country started their year on January 1. And when a country changed their year start to January 1 is often not the same as when they changed from Julian to Gregorian.
In the absence of more specific information, it is usual to assume that an unlabeled calendar reference is a Julian date reference (starting on January 1) until October 4, 1582 and a Gregorian date reference from October 15, 1582 onwards, with October 5-14, 1582 not existing. It should be noted that this calendar does not correspond to any actual calendar used by any polity in actual history that I am aware of, but it would tend to be less confusing than actual historical calendars.
In the Americas, the Julian or Gregorian calendar would have been adopted at time of European conquest. Similarly, in most of the rest of the world (which was conquered by Europeans at some time or another), civil administration would have switched to Gregorian when Europeans started administration, although this might not imply a change in local usage of calendar.
Islamic countries have had the most resistance to the Gregorian calendar, with Saudi Arabia not using it (de jure, although it was used in private industry de facto) until 2016 and Iran and Afghanistan still not using it.