Skip to content

Hijri year before year 1 is year -1 not 0. #60

@qlifee

Description

@qlifee

Hijri year before year 1 is year -1, not 0; the same behavior in the Gregorian calendar the year before 1CE is 1BCE.

I converted JD to Hijri Calendar with the following code:

from convertdate import islamic
# Example Julian day number
julian_day = 1948434  # Replace with your Julian day number
# Convert Julian day directly to Islamic (Hijri) date
hijri_year, hijri_month, hijri_day = islamic.from_jd(julian_day)
print(f"Hijri Date: {hijri_year}/{hijri_month}/{hijri_day}")

The output was:

Hijri Date: 0/12/25

While it should have been:

Hijri Date: -1/12/25

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions