79558026

Date: 2025-04-06 09:42:07
Score: 1
Natty:
Report link

The issue occurs because the django-jalali-date package incorrectly detects 1404 instead of 1403 as a leap year because it is using the algorithmic method.

The package provides two methods for leap year calculation:

  1. Algorithmic: Based on a fixed rule, which can sometimes be inaccurate.

  2. Astronomical: More precise, following actual Jalali calendar rules.

To fix this, locate the JavaScript file of the package and modify the leap year calculation: and change the method from algorithmic to astronomical.

Reasons:
  • Long answer (-0.5):
  • No code block (0.5):
  • Low reputation (1):
Posted by: Anmol Agarwal