Historical origin of the Gregorian calender