Panchanga is a Hindu astrological almanac. More information: http://en.wikipedia.org/wiki/Panchangam
This project provides an API to calculate Panchanga at any given time.
The API calculate_panchanga takes any date, time and time-zone to give the following: Thiti, Nakshatra, Yoga, Karana and Rashi.
plib.c is the file where calculations are done. panchanga.c shows usage of the API.
Just do a "make" on a Linux PC to compile and run "./panchanga -h" to see the help.