The created date does not match the input value

Created on 7 October 2021, over 2 years ago
Updated 16 November 2023, 7 months ago

Problem/Motivation

For the date 29/02/1443 the following error will appears "The created date does not match the input value. in Drupal\Component\Datetime\DateTimePlus::createFromFormat()"
This happened because of this function convertToDrupalDateTime, as 29/02/1443 is wrong date in the gregorian date

Steps to reproduce

$taarikh = \Drupal::service('plugin.manager.taarikh_algorithm');
 $algorithm = $taarikh->createInstance('fatimid_astronomical');
 $hijri_date = $algorithm->constructDateFromFormat('29/02/1443', "d-m-Y");
πŸ› Bug report
Status

Postponed: needs info

Version

1.0

Component

Code

Created by

πŸ‡―πŸ‡΄Jordan Anas_maw

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.69.0 2024