TithiTools is a versatile and precise .NET Core library for calculating Tithis, an essential aspect of Hindu and Vedic lunar calendar systems. Easily determine lunar phases and auspicious times for religious and cultural events. Flexible, efficient, and open source.
A Tithi is a fundamental concept in Hindu lunar calendars. It represents a specific lunar day or phase of the moon and is a key element in determining auspicious times for religious and cultural events.
The image above illustrates the 12-degree angle of separation between the moon and sun, which is used in Tithi calculations.
TithiTools is available as a nuget package from nuget.org
dotnet add package TithiTools
You can use the TithiTools
library in your C# application to calculate Tithis for a specific date range.
using TithiTools;
// Calculate Tithis within a date range
var tithis = TithiCalc.FindTithiInDateRange(startDate, endDate);
// Filter Tithis by specific indices
var filteredTithis = TithiCalc.FindTithiInDateRange(startDate, endDate, indexFilter: new HashSet<int> { 11, 26 });
// Set custom precision
var precisedTithis = TithiCalc.FindTithiInDateRange(startDate, endDate, precision: 0.0001d);
// Calculate angle between the sun and moon at specific time
var angle = TithiCalc.GetAngle(dateTime);
Contributions to the "TithiTools" library are welcome! Feel free to submit issues, feature requests, or pull requests to help improve the library.
This project is licensed under the GNU License.
Special thanks to the CoordinateSharp library for its contribution to celestial calculations in "TithiTools".