In 1073, the Sultan of the Seljuk Empire Malik Shah asked Omar Khayyam to become the court mathematician and astronomer. The Sultan gave him the assignment of building an observatory and recalculating the calendar for accuracy.

For the next 6 years, Omar Khayyam and his team would observe the stars and plot the cosmos. In 1079 in an amazing feat of computation, Omar Khayyam calculated the length of the year to be 365.24219858156 days. In the modern day with atomic clocks and super computers, scientists have calculated the length of the year to be 365.242190 days. Omar Khayyam’s calculation is off by fractions of a second. The length of the year calculated by Omar Khayyam is only 0.741312 seconds longer than the actual year.

Omar Khayyam’s calendar was adapted as the official calendar by the Empire and referred it as the Jalili calendar which is still in use today in Iran and Afghanistan.