-
-
Notifications
You must be signed in to change notification settings - Fork 3.7k
[5.3] FIX mistyped dates #45758
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
[5.3] FIX mistyped dates #45758
Conversation
For the farsi changes it needs to be tested by a native speaker but as far as I can tell it does not work as described in the PR. Instead of a fatal error you get an invalid date message - which is better than it is now but not as described |
@brianteeman : After checkout, did you make a |
yes of course |
chrome_3Zd10YWrT9.mp4 |
@brianteeman Can you tell me your test environment:
|
did you test using arabic or were you pasting an english character date? From looking at your code you are assuming that the year is in the gregorian calendar. ie 1900 or 2000. ~The current year in the jalali calendar is 1404 |
I did not translate the date in the error message to jalaali. I know the year 1404. I'll look at the Farsi language, please be patient, as RTL is a little unfamiliar to me. |
My gut feeling is that this PR is taking the wrong approach. I would just be outputting an error message stating that the input is incorrect and NOT trying to correct it. |
Work in progress, do not test code. Should I close the PR and reopen when I am done? |
You can close it or change it to a draft |
Pull Request for Issue #45369 .
Summary of Changes
Testing Instructions
Create/edit article, mistype date in any of the date fields (not using the date picker) on the Publishing tab.
Proper date: 2025-04-23 12:01:40
Mistyped date: 20225-04-23 12:01:40
Actual result BEFORE applying this Pull Request
Throws error:
Call to a member function format() on false
Expected result AFTER applying this Pull Request (and
npm ci
)The current year is used.
Link to documentations
Please select:
Documentation link for docs.joomla.org:
No documentation changes for docs.joomla.org needed
Pull Request link for manual.joomla.org:
No documentation changes for manual.joomla.org needed