Skip to main content

A Python package for calculating and converting Persian, Islamic, and Gregorian dates, along with zodiac signs, animal years, birthstones, and age calculations based on the Persian calendar.

Project description

SolarAge

SolarAge is a Python package designed to provide detailed information about a person's birthday, including zodiac signs, animal years, age calculations, and season of birth. It supports conversions between the Persian (Jalali), Gregorian, and Islamic calendars.

Features

  • Zodiac Sign: Get the zodiac sign based on the Gregorian birthdate.
  • Animal Year: Calculate the Chinese Zodiac animal year.
  • Birthstone: Get the birthstone based on the Persian month.
  • Age Calculation: Calculate a person's age in years, months, and days.
  • Season: Determine the season of birth (Spring, Summer, Autumn, or Winter).
  • Moon Rotation: Get the approximate number of moon rotations since the birthdate.
  • Date Conversions: Convert birthdate between Persian, Gregorian, and Islamic calendars.
  • Days Until Next Birthday: Calculate the number of days until the next birthday.

Installation

You can install the package using pip:

pip install SolarAge

Usage

Here's an example of how to use the SolarAge class:

from SolarAge import BirthdayInfo

# Create an instance of BirthdayInfo with a Persian birthdate (year, month, day)
bd = BirthdayInfo(1386, 2, 3)

# Get detailed birthday information
info = bd.get_info()

# Print the information
print(info)

Output Example:

{
    "birthday": "3 Ordibehesht، 1386",
    "miladi": "2007 ، April 23",
    "ghamari": "1428 7 23",
    "age_years": 17,
    "age_months": 9,
    "age_days": 18,
    "total_days": "6,516",
    "week_day": "Saturday",
    "season": "Spring",
    "zodiac_sign": "Taurus",
    "animal_year": "Pig",
    "days_until_birthday": 52,
    "moon_rotation": 241,
}

Dependencies

  • jdatetime: For working with the Persian (Jalali) calendar.
  • convertdate: For converting between Gregorian, Islamic, and Persian calendars.

License

This project is licensed under the MIT License - see the LICENSE file for details.

Explanation:

  1. Features: Describes the key features of your package.
  2. Installation: Instructions to install the package via pip.
  3. Usage: A code snippet demonstrating how to use the SolarAge class.
  4. Dependencies: Lists the external libraries required for your package to function.
  5. License: Optional section if you're including a license for the project.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

solarage-0.0.2.tar.gz (4.4 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

SolarAge-0.0.2-py3-none-any.whl (5.2 kB view details)

Uploaded Python 3

File details

Details for the file solarage-0.0.2.tar.gz.

File metadata

  • Download URL: solarage-0.0.2.tar.gz
  • Upload date:
  • Size: 4.4 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for solarage-0.0.2.tar.gz
Algorithm Hash digest
SHA256 03729423b3b4a641f43a2bcc21fe2dd2f309b0398ff55507127169965bc1008f
MD5 018cd1de50d682478978dfca6b802f11
BLAKE2b-256 23b3fe26ca4245442c8d992bbcf1bb4a05bed45b602532170f89b19829dcdb5f

See more details on using hashes here.

File details

Details for the file SolarAge-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: SolarAge-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 5.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.1

File hashes

Hashes for SolarAge-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 5d43d7addf29b1f99be4ee5539c99634e2239b65d025bacd7678a2dffdea0881
MD5 dbcd0b152b2bd093d93c187b92b16582
BLAKE2b-256 37d787201f210e73f7d24b07fbc38300c33e88b6522118ac10f16bd20fa45d22

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page