This is a mixed proleptic Julian (for dates prior to and including
    4-OCT-1582 A.D.) and Gregorian (for dates from 15-OCT-1582 on)
    calendar, i.e. the calendar used in the western world, if we ignore
    the chaotic differences in the times the Gregorian calendar was
    actually adopted and the Romans' early counting error that caused every
    
third year from 45 B.C. to 8 B.C. be a leap year (which was
    then corrected by not having any leap years at all from 7 B.C. until
    8 A.D., which again was a leap year).
    By the way, note that the day of the week did not change in Oct 1582,
    Oct 4 was a Thursday, and Oct 15 was a Friday! (And so is, of course,
    Oct 5, 1582 A.D. in the Julian calendar.)
    Because not all countries and regions adopted the Gregorian calendar
    in 1582 (notably many protestant areas switched much later, and some
    orthodox regions didn't switch until the 20th century), you can define
    the switch date. By default, it is set to 4-OCT-1582.