Problem Date and Time in D10 - leap year

Created on 27 June 2024, 6 months ago
Updated 2 July 2024, 6 months ago

I have an issue stemming from leap years. Unfortunately, I have not found a solution. In the Gregorian calendar, during leap years, February has 29 days instead of 28, which causes discrepancies between our date and time and the Gregorian date and time.

I am also experiencing this problem, which started exactly on March 1st after the end of February. According to calculations, since a day has been added, the Gregorian calendar does not account for it. Sometimes, when I set the date of a post in Drupal to the Jalali calendar and save it, during the form submission to convert the year 1403 to Gregorian, it encounters an error and generates a number like 2546 (I don’t remember the exact number), causing the post not to be saved and an error to be displayed.

In another instance where this issue occurs, if a web form has a date picker, for example for a birthdate, and you enter a date like 31 Shahrivar 1403, it will return an error from the date field and the form will not be saved.

Note:Drupal Version = 10

🐛 Bug report
Status

Active

Version

4.0

Component

Code

Created by

🇳🇴Norway naeim

Live updates comments and jobs are added and updated live.
Sign in to follow issues

Comments & Activities

Not all content is available!

It's likely this issue predates Contrib.social: some issue and comment data are missing.

Production build 0.71.5 2024