A Python script that leverages the datetime module and custom astrological date mappings to determine the current zodiac sign and print a birthday greeting.
This project features a script designed to check the current calendar date against a highly detailed tuple of zodiac date ranges (approved_dates). By traversing the current time metrics, the script identifies if the present day falls within a specific astrological constellation's window and celebrates with a birthday message. 🧮
-
Dynamic Date Fetching: Utilizes Python's datetime.datetime.now() and time tuples to grab real-time calendar information.
-
Astrological Mapping: Contains a comprehensive, structured dataset mapping all 12 zodiac signs (from Capricorn to Sagittarius) to their exact bridging date ranges across months.
-
Targeted Lookup: Automatically indexes into the appropriate date range based on the current calendar month.
The script executes the following logic to determine a match:
-
Fetch Time: Pulls the current date and extracts the full month name (stringified as lunar_month).
-
Filter Month: Offsets the current month index to pull the relevant zodiac dictionary from approved_dates.
-
Deep Evaluation: Runs a nested loop sequence to match the current day and year against the allowed ranges for the active constellation.
-
The Payoff: Prints 'Happy birthday!' once the exact date stamp conditions are met.
Note on Structure: The logic relies heavily on multi-layered nested loops and break control statements to meticulously isolate the correct calendar date match.
- Python 3.x
- Standard datetime library (built-in)

