We use cookies to give you the best experience possible. No personal information is stored. Using this website means that you are ok with this cookie policy
Accept & Closereturn { "Tithi": tithi, "Vara": vara, "Nakshatra": nakshatra, "Yoga": yoga, "Karana": karana }
def calculate_yoga(self): # Calculate yoga yoga_names = ["Vishkamba", "Preeti", "Aayushman", "Shuba", "Shobha", "Amrita", "Chandra", "Dhurja", "Siddha", "Vyasa", "Vyagra", "Uthama", "Sooma", "Sadhya", "Vriddha", "Dhruva"] yoga_value = (self.date.timetuple().tm_yday + 11) % 27 if yoga_value == 0: yoga_value = 27 return yoga_names[int(yoga_value) - 1]
class TeluguPanchangam: def __init__(self, date): self.date = date
def get_panchangam(self): tithi = self.calculate_tithi() vara = self.calculate_vara() nakshatra = self.calculate_nakshatra() yoga = self.calculate_yoga() karana = self.calculate_karana()
Loading …