Open source software for Sherab Ling Tibetan calendar.

H.E. Tai Situ Rinpoche, founder of Sherab Ling monastery, Himachal Pradesh, India.

The calendar currently published by Sherab Ling monastery was originally devised by Kojo Tsewang Namgyal. Tsenam unfortunately had been unable fully to document his work on the Tibetan calendar before he died at the end of 2006. His calendar as it stood at that time was ready for publication, but could also have been considered to some extent to be a "work in progress". Partly to document that work, and also to facilitate the use and development of this calendar by Sherab Ling, Samye Ling and other interested organisations, open source software for Tsenam's calendar is made available on this page.

The main epoch (1987) data used was the last set of such data known to have been devised by Tsenam, and the full set of this data is given here. Recently (February 2011), data for a much earlier epoch have been added.

If you find any errors in this software, or have any comments, suggested changes or additions, please address these to Edward Henning. To download the software and its source code:

Click below for:
Version 1.00Original version.
Version 1.01New Win32 command line version to support Windows Vista and Windows 7. See the "Windows compatibility" box here for further details. This version 1.01 is otherwise functionally the same as v.1.00.
Version 1.02In response to a request, this adds a second epoch, for year -1000. The earlier versions only used the 1987 epoch as defined by Tsenam. The new epoch for three thousand years ago allows for calendar data in historical periods.
Version 1.03This version extends the range for Chinese month values. Earlier versions gave correct data for the range 2006 to 2013. The Chinese month number is needed to calculate the lunar day data such as trigrams, and has now been extended for the years 1900 to 2100 CE, inclusive. Requests outside of that range have the Chinese month value set to the Tibetan value; they are equal approximately half the time, anyway.
Version 1.20This version includes some general tidying up of the code, also extensive symbolic information making it compatible with the Tsurphu calendar that is available and explained here. To have the extensive data written to disk type "slc full+".

The software was first developed using the Open Watcom C/C++ compiler, version 1.8. The latest versions, 1.01 to 1.20, have been developed using Open Watcom C/C++ version 1.9.

This present software has been extracted from an original program into which Tsenam's data and methods were added over a period of months during 2006. This information came both via email and word of mouth, and so the addition into the software was a little haphazard. For this reason, certain parts of the software contain old debug code and need some cleaning – hopefully this situation will be improved over the coming months. It certainly gives the correct data in its results. Also, some symbolic information requested by Sherab Ling was not fully implemented until version 1.20.

The software was originally developed for the purpose of helping Sherab Ling with the publication of its yearly calendar. For this reason, for each year three text files are created, containing much more information than would normally be expected or needed. In order to restrict this, a flag was included in module T4.C. For version before 1.20, for the full file output, set full_print to 1, and for the more generally useful limited file output, set it to 0. The default value is 0. For versions from 1.20, type "slc full" in order to have the full output printed to disk.

    E. Henning.
    Last updated 10 September 2013.
    Return to calendar introduction.