A TypeScript/React application that calculates Hindu astrological elements (Panchanga) for any given date based on Kathmandu, Nepal's coordinates.
- Calculates daily Panchanga elements:
- Tithi (Lunar Day)
- Nakshatra (Lunar Mansion)
- Yoga (Sun-Moon Angular Relationship)
- Karana (Half Lunar Day)
- Rashi (Moon Sign)
- Provides Solar calendar information:
- Solar Month (based on sidereal sun position)
- Solar Day (progress in current solar month)
- Days in Month (variable 29-32 days)
- Shows timings for:
- Sunrise and Sunset
- Tithi Start and End times
- Includes detailed debug information for astronomical calculations
- Responsive design with Tailwind CSS
- Built with TypeScript for type safety
- Node.js (v16 or higher)
- npm (v7 or higher) or yarn (v1.22 or higher)
- Git (for cloning the repository)
- Clone the repository:
git clone https://github.com/khumnath/panchanga-calculator.git
cd panchanga-calculator- Install dependencies:
npm install
# or
yarn install- Start the development server:
npm run dev
# or
yarn dev- Open your browser and navigate to
http://localhost:5173
To create a production build:
npm run build
# or
yarn buildThe build output will be in the docs directory.
- Frontend: React 18 with TypeScript
- Styling: Tailwind CSS for modern, utility-first styling
- Build Tool: Vite for fast development and optimized builds
- Location: Fixed to Kathmandu, Nepal (27.7172°N, 85.324°E)
- Time Zone: Nepal Time (UTC+5:45)
- Package Manager: npm or yarn
The calculator implements several astronomical algorithms:
- Lahiri Ayanamsa for sidereal calculations
- Solar and Lunar position calculations
- Sunrise/Sunset computations for given latitude/longitude
- Tithi (lunar phase) boundary detection with iterative refinement
- Solar month boundaries based on sidereal solar longitudes
- Calculations are optimized for Kathmandu, Nepal
- Results may vary from traditional almanacs due to:
- Simplified astronomical formulae
- Different ayanamsa (precession) models
- Rounding of times and angles
- Date range: 1900-2100 CE for best accuracy
- Solar day calculations may occasionally differ from traditional calendars
- Tithi boundary times are approximate within ±2 minutes
- All calculations are geometric (no atmospheric refraction)
- Fork the repository
- Create your feature branch (
git checkout -b feature/AmazingFeature) - Commit your changes (
git commit -m 'Add some AmazingFeature') - Push to the branch (
git push origin feature/AmazingFeature) - Open a Pull Request
Please ensure your code follows the existing code style and appropriate comments.
This project is licensed under the GNU General Public License v3.0 or later - see the LICENSE file for details.
Copyright (C) 2025 Khumnath Cg nath.khum@gmail.com
- Based on traditional Hindu astronomical calculations
- Modern astronomical algorithms adapted for web usage
- Inspired by traditional Panchanga almanacs
- UI design inspired by modern web applications