 However, E. S. Kennedy points out that while it was possible in pre-Islamic mathematics to compute the magnitudes of a spherical figure, in principle, by use of the table of chords and Menelaus' theorem, the application of the theorem to spherical problems was very difficult in practice.In order to observe holy days on the Islamic calendar in which timings were determined by phases of the moon, astronomers initially used Menelaus' method to calculate the place of the moon and stars, though this method proved to be clumsy and difficult.It involved setting up two intersecting right triangles; by applying Menelaus' theorem it was possible to solve one of the six sides, but only if the other five sides were known.