section_path: Calculations/The four gates
section_name: The four gates
paragraph_text: The four gates
  
  The keviah, and thus the annual calendar, of a numbered Hebrew year can be determined by consulting the table of Four Gates, whose inputs are the year's position in the 19-year cycle and its molad Tishrei.: 150–152 In this table, the years of a 19-year cycle are organized into four groups (called "gates"): common years after a leap year but before a common year (1 4 9 12 15); common years between two leap years (7 18); common years after a common year but before a leap year (2 5 10 13 16); and leap years (3 6 8 11 14 17 19).
  
  This table: 150 : 183 numbers the days of the week and hours for the limits of molad Tishrei in the Hebrew manner for calendrical calculations, that is, both begin at 6 pm, thus 7d 18h 0p is noon Saturday, with the week starting on 1d 0h 0p (Saturday 6pm, i.e. the beginning of Sunday reckoned in the Hebrew manner). The oldest surviving table of Four Gates was written by Muhammad ibn Musa al-Khwarizmi in 824.