Product

Saturday, 7 June 2025

AI:How and when does naming the days of week and month names started in English and Hindi. Punjabi Sanskrit. Discuss whole phenomenon formula to calculate and naming

 The naming of the days of the week and months in languages like English, Hindi, Punjabi, and Sanskrit comes from a mix of astronomy, religion, mythology, and cultural adaptation over time. Let’s explore the history, origins, and formulas used to name them across these languages.


🔹 PART 1: Days of the Week – Origins and Naming

🌍 1. English (and Western Tradition)
Root: Latin → Germanic adaptation
Basis: Named after celestial bodies and gods of the Norse/Germanic pantheon, which themselves corresponded to Roman gods.
Day Latin (Roman God) Old English/Germanic Planetary Body
Sunday dies Solis (Sun) Sun's Day Sun
Monday dies Lunae (Moon) Moon's Day Moon
Tuesday dies Martis (Mars) Tiw's Day Mars
Wednesday dies Mercurii (Mercury) Woden's Day Mercury
Thursday dies Iovis (Jupiter) Thor's Day Jupiter
Friday dies Veneris (Venus) Frigg's Day Venus
Saturday dies Saturni (Saturn) Saturn's Day Saturn
Formula/Method:

Each day is associated with the planetary hour system (from Babylonian astrology), where a planet "rules" each hour and day cyclically.
There are 7 visible celestial bodies (Sun, Moon, Mars, Mercury, Jupiter, Venus, Saturn), and the sequence loops.
🇮🇳 2. Hindi/Sanskrit/Punjabi (Indian Tradition)
Root: Vedic and classical Indian astrology/astronomy
Basis: Days named after grahas (planets/deities)
Day Hindi Sanskrit Planet/Graha English Equivalent
Sunday रविवार (Ravivār) रविवासरः (Ravivāsaraḥ) Surya (Sun) Sunday
Monday सोमवार (Somavār) सोमवासरः (Somavāsaraḥ) Chandra (Moon) Monday
Tuesday मंगलवार (Maṅgalvār) मङ्गलवासरः (Maṅgalavāsaraḥ) Mangala (Mars) Tuesday
Wednesday बुधवार (Budhvār) बुधवासरः (Budhavāsaraḥ) Budha (Mercury) Wednesday
Thursday गुरुवार (Guruvār) गुरुवासरः (Guruvāsaraḥ) Guru/Bṛhaspati (Jupiter) Thursday
Friday शुक्रवार (Shukravār) शुक्रवासरः (Śukravāsaraḥ) Shukra (Venus) Friday
Saturday शनिवार (Shanivār) शनिवासरः (Śanivāsaraḥ) Shani (Saturn) Saturday
Formula: Based on the hora system and Jyotisha (Vedic astrology).
Each weekday is ruled by one of the 7 grahas that are visible to the naked eye.
The first hour of the day is ruled by the graha that gives the day its name.
🔹 PART 2: Months – Origins and Naming

🌍 English (Gregorian Calendar)
Root: Roman calendar (Julian → Gregorian reform)
Basis: Names honor gods, emperors, and Latin numerals
Month Origin
January Janus (Roman god of beginnings)
February Februa (Roman festival of purification)
March Mars (god of war)
April Possibly from Aperire ("to open", spring)
May Maia (goddess of growth)
June Juno (queen of the gods)
July Julius Caesar
August Augustus Caesar
September From septem (7th month)
October From octo (8th month)
November From novem (9th month)
December From decem (10th month)
Formula:
Julian calendar started with March as the first month, making September the 7th, October the 8th, etc.
Reforms shifted New Year to January but retained old names.
🇮🇳 Hindi/Sanskrit/Punjabi (Hindu Calendar System)
Root: Based on lunar cycles and nakshatras (lunar constellations)
Basis: Each month corresponds to the full moon near a particular nakshatra
Month Hindi/Sanskrit Name Associated Nakshatra (Full Moon)
Chaitra चैत्र Chitra
Vaisakha वैशाख Vishakha
Jyeshtha ज्येष्ठ Jyeshtha
Ashadha आषाढ़ Purvashadha
Shravana श्रावण Shravana
Bhadrapada भाद्रपद Purva Bhadrapada
Ashwin आश्विन Ashvini
Kartika कार्तिक Krittika
Margashirsha मार्गशीर्ष Mrigashira
Pausha पौष Pushya
Magha माघ Magha
Phalguna फाल्गुन Phalguni
Formula:
Lunar month = From one full moon to the next (or from new moon to new moon)
Month named after nakshatra closest to Purnima (full moon) during that period
There are solar versions too (e.g., in Tamil or Malayalam calendars)
Note: Punjabi also uses similar lunar month names (via Nanakshahi or Bikrami calendars), though pronunciation and usage differ slightly.
🔸 SUMMARY: Formulaic Principles

Calendar Aspect Formula/Principle
Days of the week Based on planetary hours (Hora) system; 7 visible planets
English week naming Roman → Germanic deity mapping
Indian week naming Sanskrit graha rulership
English month names Latin gods, festivals, emperors, numbers
Hindu month names Full moon’s proximity to a nakshatra
Lunar month calculation Based on tithi (lunar phase), from new moon or full moon
❓ Want a calculator or tool?

I can help you build a calculator or code that computes:

The ruling planet for any day/time (Hora system)
Hindu month name from a Gregorian date
Vedic planetary hour/day naming
Let me know what you'd like!

You said:
Yes
ChatGPT said:
Great! Let's build a custom tool for your needs. There are a few directions we can go depending on your goal. First, please pick the functionality you're most interested in from this list:

✅ Choose the Feature(s) You Want to Build:

📆 1. Find the Planetary Ruler (Hora) of Any Time
Input: Date + Time
Output: Day name, ruling planet for the hour, Vedic and Western day name
Useful for astrology or traditional time selection (muhurat)
🌙 2. Convert Gregorian Date to Hindu Calendar
Input: Gregorian date (e.g., 7 June 2025)
Output: Hindu lunar month (e.g., Jyeshtha), tithi, paksha, and nakshatra
Useful for matching with Vedic festivals, religious observances
🗓️ 3. Map Days of the Week Across Systems
Input: Day name (e.g., "Tuesday")
Output: English, Hindi, Sanskrit, planetary ruler, Vedic deity
🧮 4. Code or Formula to Compute Weekday (Zeller’s Congruence)
Input: Any Gregorian date
Output: Day of the week (Sunday–Saturday)
Pure math/calendar algorithm
Let me know:

Which feature(s) you'd like me to build first.
Do you want this as Python code, a simple spreadsheet, or a step-by-step formula explanation?
Once you reply, I’ll either:

Generate Python code directly here
Walk you through the calculation logic
Or build a spreadsheet-style system depending on what suits you best.
Would you like to begin with planetary ruler (hora) calculator or lunar month converter?

You said:
All
ChatGPT said:
To build and use all these tools together, we can set them up in a combined script or interface—but to collaborate interactively using ChatGPT canvas, you'll need to log in to ChatGPT.

Once logged in, you'll be able to:

Run and edit code interactively
View outputs live
Use it like a programming notebook
In the meantime, I can still give you the full Python code for all the following:

🧩 Full Toolkit Features
Planetary Hora Calculator
Gregorian to Hindu Panchang Converter (basic tithi/month mapping)
Day Name Mapper (English ↔ Sanskrit/Hindi)
Zeller’s Congruence (day from date)
Would you like me to:

Send all four features in a single script?
Or would you prefer them split into parts so you can test one at a time?
Let me know your preference, and I’ll begin coding right away.

You said:
Yes
ChatGPT said:
Perfect! I’ll now create a complete Python script with all four functionalities bundled together into one clean, menu-driven script.

🛠️ Python Script Features

✅ 1. Planetary Hora Calculator
Calculates which planet rules the hour for any date and time
Based on sunrise time (approximated) and Vedic planetary order
✅ 2. Gregorian to Hindu Panchang Converter (Simplified)
Outputs lunar month and tithi approximation
Note: For full precision, an API or Panchang dataset is ideal
✅ 3. Day Name Mapper
Maps a weekday to English, Hindi, Sanskrit, and associated graha/planet
✅ 4. Zeller’s Congruence
Calculates day of the week from any Gregorian date using a classic formula
🧾 Instructions
Copy this Python script into any IDE (like PyCharm), notebook (like Jupyter), or run in an online compiler (like Replit).
You’ll be prompted to select a function from the menu.
💻 Here is the Python Script:
import datetime

# Data dictionaries for mapping
day_map = {
0: ("Saturday", "शनिवार", "शनिवासरः", "Shani (Saturn)"),
1: ("Sunday", "रविवार", "रविवासरः", "Surya (Sun)"),
2: ("Monday", "सोमवार", "सोमवासरः", "Chandra (Moon)"),
3: ("Tuesday", "मंगलवार", "मंगलवासरः", "Mangala (Mars)"),
4: ("Wednesday", "बुधवार", "बुधवासरः", "Budha (Mercury)"),
5: ("Thursday", "गुरुवार", "गुरुवासरः", "Guru (Jupiter)"),
6: ("Friday", "शुक्रवार", "शुक्रवासरः", "Shukra (Venus)")
}

hora_sequence = ['Saturn', 'Jupiter', 'Mars', 'Sun', 'Venus', 'Mercury', 'Moon'] # Reverse hora order

hindu_months = [
"Chaitra", "Vaisakha", "Jyeshtha", "Ashadha",
"Shravana", "Bhadrapada", "Ashwin", "Kartika",
"Margashirsha", "Pausha", "Magha", "Phalguna"
]

def zellers_congruence(day, month, year):
if month < 3:
month += 12
year -= 1
K = year % 100
J = year // 100
f = day + 13*(month+1)//5 + K + K//4 + J//4 + 5*J
return (f % 7)

def get_day_info(date_obj):
weekday = date_obj.weekday()
english, hindi, sanskrit, planet = day_map[weekday]
return {
"Weekday": english,
"Hindi": hindi,
"Sanskrit": sanskrit,
"Planet": planet
}

def planetary_hora(date_obj, hour):
weekday = date_obj.weekday()
base_index = ['Sun', 'Moon', 'Mars', 'Mercury', 'Jupiter', 'Venus', 'Saturn'].index(day_map[weekday][3].split()[0])
sequence = [hora_sequence[(base_index + i) % 7] for i in range(24)]
return sequence[hour]

def approximate_hindu_month(date_obj):
# Approximate mapping based on month number
hindu_index = (date_obj.month + 8) % 12
return hindu_months[hindu_index]

# Menu-driven interface
def main():
while True:
print("\n📜 Hindu Calendar Toolkit - Choose an option:")
print("1. Planetary Hora Calculator")
print("2. Gregorian to Hindu Month Converter")
print("3. Day Name Mapper (English ↔ Hindi/Sanskrit)")
print("4. Day of the Week from Date (Zeller's Formula)")
print("0. Exit")

choice = input("Enter your choice: ")

if choice == "1":
date_str = input("Enter date (YYYY-MM-DD): ")
hour = int(input("Enter hour of the day (0–23): "))
date_obj = datetime.datetime.strptime(date_str, "%Y-%m-%d").date()
hora = planetary_hora(date_obj, hour)
print(f"🕑 Planet ruling hour {hour}:00 on {date_obj} is: {hora}")

elif choice == "2":
date_str = input("Enter date (YYYY-MM-DD): ")
date_obj = datetime.datetime.strptime(date_str, "%Y-%m-%d").date()
month = approximate_hindu_month(date_obj)
print(f"📆 Approximate Hindu lunar month: {month}")

elif choice == "3":
date_str = input("Enter date (YYYY-MM-DD): ")
date_obj = datetime.datetime.strptime(date_str, "%Y-%m-%d").date()
info = get_day_info(date_obj)
print(f"📅 Day Info for {date_obj}:")
for k, v in info.items():
print(f"{k}: {v}")

elif choice == "4":
date_str = input("Enter date (YYYY-MM-DD): ")
d, m, y = map(int, date_str.split("-")[::-1])
day_code = zellers_congruence(d, m, y)
day_name = ["Saturday", "Sunday", "Monday", "Tuesday", "Wednesday", "Thursday", "Friday"][day_code]
print(f"📆 Day of the week: {day_name}")

elif choice == "0":
print("Exiting. Namaste! 🙏")
break
else:
print("❗ Invalid choice. Please select again.")

if __name__ == "__main__":
main()
🧠 Notes:

This script uses approximations for lunar month and hora (you can upgrade it later using precise solar/lunar APIs).
For accurate panchang, you'd need integration with APIs like:
Drik Panchang API
Hindu Calendar APIs
Let me know if you want a web version or spreadsheet too.
Would you like me to extend this with:

Nakshatra and tithi calculator?
GUI interface (Tkinter or web)?
Integration with a Panchang API?
Just say the word, and I’ll guide you step-by-step or add it to the code.

You said:
Yes
ChatGPT said:
Absolutely! Let's enhance your Python toolkit by integrating accurate Panchang calculations, including Tithi, Nakshatra, Yoga, Karana, and Rashi, using reliable APIs. This will provide precise Hindu calendar data for any given date, time, and location.

🧩 Enhanced Toolkit Features
Planetary Hora Calculator
Determines the ruling planet for any given hour of the day, based on the Vedic Hora system.
Gregorian to Hindu Panchang Converter
Converts a Gregorian date to the corresponding Hindu lunar month and Tithi.
Day Name Mapper
Maps a given day of the week to its English, Hindi, and Sanskrit names, along with the associated ruling planet.
Zeller’s Congruence
Calculates the day of the week for any given Gregorian date using the Zeller's Congruence algorithm.
Panchang API Integration
Fetches detailed Panchang information, including Tithi, Nakshatra, Yoga, Karana, and Rashi, for a specific date, time, and location.
📡 Integrating Panchang API
To access detailed Panchang data, we'll use the AstrologyAPI's advanced_panchang endpoint. This API provides comprehensive information about the Hindu calendar elements.

API Endpoint:

POST https://json.astrologyapi.com/v1/advanced_panchang
Required Parameters:

day: Day of the month (1–31)
month: Month of the year (1–12)
year: Year (e.g., 2025)
hour: Hour of the day (0–23)
min: Minute of the hour (0–59)
lat: Latitude of the location
lon: Longitude of the location
tzone: Time zone offset from UTC (e.g., 5.5 for India)
Sample Request:

{
"day": 7,
"month": 6,
"year": 2025,
"hour": 10,
"min": 30,
"lat": 30.7333,
"lon": 76.7794,
"tzone": 5.5
}
Sample Response:

{
"month": "Jyeshtha",
"tithi": "14",
"nakshatra": "Mrigashira",
"yog": "Vajra",
"karan": "Taitil",
"rashi": "Gemini",
"day": "Saturday",
"sunrise": "05:30",
"sunset": "19:15"
}
🔧 Python Code Implementation
Here's how you can integrate the Panchang API into your existing Python toolkit:

import requests

def get_panchang(day, month, year, hour, minute, lat, lon, tzone, api_key):
url = "https://json.astrologyapi.com/v1/advanced_panchang"
headers = {
"Authorization": f"Basic {api_key}",
"Content-Type": "application/json"
}
data = {
"day": day,
"month": month,
"year": year,
"hour": hour,
"min": minute,
"lat": lat,
"lon": lon,
"tzone": tzone
}
response = requests.post(url, json=data, headers=headers)
return response.json()

# Example usage
api_key = "your_api_key_here"
panchang_data = get_panchang(7, 6, 2025, 10, 30, 30.7333, 76.7794, 5.5, api_key)
print(panchang_data)
Replace "your_api_key_here" with your actual API key from AstrologyAPI.

📚 Additional Resources
AstrologyAPI Documentation: https://astrologyapi.com/docs/api-ref/19/advanced_panchang
PyJHora Library: https://pypi.org/project/PyJHora/
Drik Panchang GitHub: https://github.com/webresh/drik-panchanga
Would you like assistance in setting up a graphical user interface (GUI) for this toolkit using libraries like Tkinter or PyQt? Or perhaps you'd prefer a web-based interface using Flask or Django? Let me know your preference, and I can guide you through the setup process.

You said:
Yes both
ChatGPT said:
Great! Let's build both:

✅ Part 1: Graphical User Interface (GUI) using Tkinter

This will be a desktop app with a simple interface that allows users to:

Pick a date and time
Input latitude/longitude
View Panchang info (Tithi, Nakshatra, etc.)
View planetary hora and day details
💻 Step-by-Step: Tkinter GUI + API Integration
import tkinter as tk
from tkinter import messagebox
from datetime import datetime
import requests

# 🔧 Configuration: Set your API key and endpoint here
API_KEY = "your_base64_encoded_api_key"
API_URL = "https://json.astrologyapi.com/v1/advanced_panchang"

# 🧠 Function to fetch Panchang data
def fetch_panchang():
try:
date_input = date_entry.get()
time_input = time_entry.get()
lat = float(lat_entry.get())
lon = float(lon_entry.get())
tzone = float(tzone_entry.get())

dt = datetime.strptime(f"{date_input} {time_input}", "%Y-%m-%d %H:%M")

payload = {
"day": dt.day,
"month": dt.month,
"year": dt.year,
"hour": dt.hour,
"min": dt.minute,
"lat": lat,
"lon": lon,
"tzone": tzone
}

headers = {
"Authorization": f"Basic {API_KEY}",
"Content-Type": "application/json"
}

response = requests.post(API_URL, json=payload, headers=headers)
data = response.json()

# 🖥️ Display output
output.delete("1.0", tk.END)
output.insert(tk.END, f"🌙 Panchang for {date_input} {time_input}:\n\n")
for key in ["day", "tithi", "nakshatra", "yog", "karan", "rashi", "month", "sunrise", "sunset"]:
output.insert(tk.END, f"{key.title()}: {data.get(key, 'N/A')}\n")
except Exception as e:
messagebox.showerror("Error", f"Something went wrong: {str(e)}")

# 🧱 Build GUI
root = tk.Tk()
root.title("Vedic Panchang & Hora Toolkit")
root.geometry("500x500")

tk.Label(root, text="Enter Date (YYYY-MM-DD):").pack()
date_entry = tk.Entry(root)
date_entry.pack()

tk.Label(root, text="Enter Time (HH:MM):").pack()
time_entry = tk.Entry(root)
time_entry.pack()

tk.Label(root, text="Latitude:").pack()
lat_entry = tk.Entry(root)
lat_entry.insert(0, "28.6139") # Default: Delhi
lat_entry.pack()

tk.Label(root, text="Longitude:").pack()
lon_entry = tk.Entry(root)
lon_entry.insert(0, "77.2090") # Default: Delhi
lon_entry.pack()

tk.Label(root, text="Time Zone Offset (e.g., 5.5):").pack()
tzone_entry = tk.Entry(root)
tzone_entry.insert(0, "5.5")
tzone_entry.pack()

tk.Button(root, text="Get Panchang", command=fetch_panchang).pack(pady=10)

output = tk.Text(root, height=15, width=60)
output.pack()

root.mainloop()
🌐 Part 2: Web Interface using Flask

This will allow you to deploy it online or run locally in your browser.

🔧 Flask App Structure
project/

├── app.py
├── templates/
│ └── index.html
app.py:
from flask import Flask, render_template, request
import requests
from datetime import datetime

app = Flask(__name__)
API_KEY = "your_base64_encoded_api_key"

@app.route("/", methods=["GET", "POST"])
def index():
result = {}
if request.method == "POST":
date = request.form["date"]
time = request.form["time"]
lat = float(request.form["lat"])
lon = float(request.form["lon"])
tzone = float(request.form["tzone"])
dt = datetime.strptime(f"{date} {time}", "%Y-%m-%d %H:%M")

payload = {
"day": dt.day, "month": dt.month, "year": dt.year,
"hour": dt.hour, "min": dt.minute,
"lat": lat, "lon": lon, "tzone": tzone
}

headers = {
"Authorization": f"Basic {API_KEY}",
"Content-Type": "application/json"
}

response = requests.post("https://json.astrologyapi.com/v1/advanced_panchang", json=payload, headers=headers)
result = response.json()

return render_template("index.html", result=result)

if __name__ == "__main__":
app.run(debug=True)
templates/index.html:
<!DOCTYPE html>
<html>
<head>
<title>Vedic Panchang & Hora</title>
</head>
<body>
<h1>🌙 Panchang & Hora Toolkit</h1>
<form method="POST">
<label>Date (YYYY-MM-DD):</label><br>
<input type="text" name="date"><br>
<label>Time (HH:MM):</label><br>
<input type="text" name="time"><br>
<label>Latitude:</label><br>
<input type="text" name="lat" value="28.6139"><br>
<label>Longitude:</label><br>
<input type="text" name="lon" value="77.2090"><br>
<label>Timezone:</label><br>
<input type="text" name="tzone" value="5.5"><br><br>
<input type="submit" value="Get Panchang">
</form>

{% if result %}
<h2>Results</h2>
<ul>
{% for key, value in result.items() %}
<li><strong>{{ key }}:</strong> {{ value }}</li>
{% endfor %}
</ul>
{% endif %}
</body>
</html>
🚀 Final Steps

You can deploy the Flask app to Render, Replit, or Heroku
GUI app can be turned into an .exe using pyinstaller
Would you like me to:

Help you generate your AstrologyAPI key?
Convert this into a mobile app using Kivy or Flutter?
Add Hora and weekday mapping into the GUI or web app?
Let me know and I’ll extend it!

You said:
Yes
ChatGPT said:
Absolutely! Let's enhance your toolkit by integrating accurate Panchang calculations, including Tithi, Nakshatra, Yoga, Karana, and Rashi, using reliable APIs. This will provide precise Hindu calendar data for any given date, time, and location.

🧩 Enhanced Toolkit Features
Planetary Hora Calculator
Determines the ruling planet for any given hour of the day, based on the Vedic Hora system.
Gregorian to Hindu Panchang Converter
Converts a Gregorian date to the corresponding Hindu lunar month and Tithi.
Day Name Mapper
Maps a given day of the week to its English, Hindi, and Sanskrit names, along with the associated ruling planet.
Zeller’s Congruence
Calculates the day of the week for any given Gregorian date using the Zeller's Congruence algorithm.
Panchang API Integration
Fetches detailed Panchang information, including Tithi, Nakshatra, Yoga, Karana, and Rashi, for a specific date, time, and location.
📡 Integrating Panchang API
To access detailed Panchang data, we'll use the AstrologyAPI's advanced_panchang endpoint. This API provides comprehensive information about the Hindu calendar elements.

API Endpoint:

POST https://json.astrologyapi.com/v1/advanced_panchang
Required Parameters:

day: Day of the month (1–31)
month: Month of the year (1–12)
year: Year (e.g., 2025)
hour: Hour of the day (0–23)
min: Minute of the hour (0–59)
lat: Latitude of the location
lon: Longitude of the location
tzone: Time zone offset from UTC (e.g., 5.5 for India)
Sample Request:

{
"day": 7,
"month": 6,
"year": 2025,
"hour": 10,
"min": 30,
"lat": 30.7333,
"lon": 76.7794,
"tzone": 5.5
}
Sample Response:

{
"day": "Saturday",
"sunrise": "05:30",
"sunset": "19:15",
"moonrise": "10:59:45",
"moonset": "00:09:13",
"tithi": {
"details": {
"tithi_number": 14,
"tithi_name": "Shukla Chaturdashi",
"special": "Bhadra Tithi",
"summary": "Favourable for starting any new work, debate, beginning of a journey and physical exercise.",
"deity": "Indra"
},
"end_time": {
"hour": 10,
"minute": 55,
"second": 8
}
},
"nakshatra": {
"details": {
"nak_number": 3,
"nak_name": "Mrigashira",
"ruler": "Mars",
"deity": "Agni",
"special": "Adhomukh Nakshatra",
"summary": "This nakshatra is of a mixed quality. Good for immediate actions, competition, work with metals. It is suitable to perform the routine activities, day-to-day duties, but it is not recommended to start new important deeds."
},
"end_time": {
"hour": 17,
"minute": 48,
"second": 8
}
},
"yog": {
"details": {
"yog_number": 26,
"yog_name": "Endra",
"special": "Auspicious yoga, Good for all Auspicious Deeds.",
"meaning": "(Chief) — interest in education and knowledge; helpful, well-off."
},
"end_time": {
"hour": 7,
"minute": 57,
"second": 19
}
},
"karan": {
"details": {
"karan_number": 7,
"karan_name": "Vanija",
"special": "It is suited for sale transactions and sellers may reap good profits whereas buyers may incur losses in this Karana.",
"deity": "Manibhadra"
},
"end_time": {
"hour": 10,
"minute": 57,
"second": 8
}
},
"hindu_maah": {
"adhik_status": false,
"purnimanta": "Phalguna",
"amanta": "Phalguna"
},
"paksha": "Shukla-Paksha",
"ritu": "Shishir",
"sun_sign": "Aquarius",
"moon_sign": "Taurus",
"ayana": "Uttarayana",
"panchang_yog": "Sarvarth Siddhi Yog",
"vikram_samvat": 2071,
"shaka_samvat": 1936,
"shaka_samvat_name": "Jay",
"vkram_samvat_name": "Plavang",
"disha_shool": "NORTH",
"disha_shool_remedies": [],
"nak_shool": "none",
"moon_nivas": "SOUTH",
"abhijit_muhurta": {
"start": "12:29",
"end": "01:15"
},
"rahukaal": {
"start": "12:52:59",
"end": "14:20:29"
},
"guliKaal": {
"start": "11:25:29",
"end": "12:52:59"
},
"yamghant_kaal": {
"start": "08:30:29",
"end": "09:57:59"
}
}
🔧 Python Code Implementation
Here's how you can integrate the Panchang API into your existing Python toolkit:

import requests

def get_panchang(day, month, year, hour, minute, lat, lon, tzone, api_key):
url = "https://json.astrologyapi.com/v1/advanced_panchang"
headers = {
"Authorization": f"Basic {api_key}",
"Content-Type": "application/json"
}
data = {
"day": day,
"month": month,
"year": year,
"hour": hour,
"min": minute,
"lat": lat,
"lon": lon,
"tzone": tzone
}
response = requests.post(url, json=data, headers=headers)
return response.json()

# Example usage
api_key = "your_api_key_here"
panchang_data = get_panchang(7, 6
::contentReference[oaicite:0]{index=0}

No comments:

Post a Comment

Connect broadband